Skip to content

Commit

Permalink
Escape unprintable 0x7F (delete control character) (#2144)
Browse files Browse the repository at this point in the history
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
  • Loading branch information
ntkme and nex3 committed Dec 11, 2023
1 parent f5dab76 commit 6f665c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Produce better output for numbers with complex units in `meta.inspect()` and
debugging messages.

* Escape U+007F DELETE when serializing strings.

* When generating CSS error messages to display in-browser, escape all code
points that aren't in the US-ASCII region. Previously only code points U+0100
LATIN CAPITAL LETTER A WITH MACRON were escaped.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/visitor/serialize.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,8 @@ final class _SerializeVisitor
$fs ||
$gs ||
$rs ||
$us:
$us ||
$del:
_writeEscape(buffer, char, string, i);

case $backslash:
Expand Down

0 comments on commit 6f665c1

Please sign in to comment.