You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was a bug where the hex-to-oct conversion would match \\x01. But
support for octal escape sequences is optional in any case, and forbidden in
strict mode, so we should avoid using these.
As per the ECMAScript 5.1 spec, any source character (which may be any
unicode code point) can be used inside a string literal, with the exception
of backslash, line terminator or the quoting character. So we do just that:
dump a lot of raw bytes into the string literal and escape only what needs
to be escaped.
There is one catch, though: sources are usually encoded in UTF-8, in which
case we can't exactly plug in raw bytes, but have to use UTF-8 sequences for
the range \x80 through \xff. This may cause problems if the source file is
NOT interpreted as UTF-8.
0 commit comments