Trying to understand what accounts for "\8"
and "\9"
being considered valid string literals with identity escapes in Chrome and FF.
Annex B permits sloppy mode to include legacy octal escapes in strings. It achieves this by replacing the ‘normal’ (strict) EscapeSequence production with a new version accompanied by three new productions.
- Strict: https://tc39.es/ecma262/#prod-EscapeSequence
- Sloppy: https://tc39.es/ecma262/#prod-annexB-EscapeSequence
In the sloppy version, three of the alternatives are the same. The change is replacing this rule:
"0" [lookahead ∉ DecimalDigit]