Skip to content

Scripts with '\bb' in a text input disappear #58

@adroitwhiz

Description

@adroitwhiz

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions