Skip to content

Commit 6f665c1

Browse files
ntkmenex3
andauthored
Escape unprintable 0x7F (delete control character) (#2144)
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
1 parent f5dab76 commit 6f665c1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Produce better output for numbers with complex units in `meta.inspect()` and
44
debugging messages.
55

6+
* Escape U+007F DELETE when serializing strings.
7+
68
* When generating CSS error messages to display in-browser, escape all code
79
points that aren't in the US-ASCII region. Previously only code points U+0100
810
LATIN CAPITAL LETTER A WITH MACRON were escaped.

lib/src/visitor/serialize.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,8 @@ final class _SerializeVisitor
10901090
$fs ||
10911091
$gs ||
10921092
$rs ||
1093-
$us:
1093+
$us ||
1094+
$del:
10941095
_writeEscape(buffer, char, string, i);
10951096

10961097
case $backslash:

0 commit comments

Comments
 (0)