-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
EDIT: this appears to only affect Firefox
This is another instance of ASCII backspaces making scripts disappear.
The sequence "\b" is stripped from the input JSON string before parsing. This is to prevent ASCII backspaces from appearing during parsing, which cause scripts to disappear.
However, when the raw text "\b" (a backslash followed by a lowercase b) appears inside double-quoted strings, it takes the form "\b" (a backslash followed by another backslash followed by a lowercase b). The second backslash escapes the first.
As such, when you type "\bb", it is serialized as "\bb". The parser strips out the "\b" in the middle, leaving one additional "\b". This is then parsed into an ASCII backspace, and the script disappears.