Escape null characters as \x00
Since \0 might be mistakenly interpreted as octal if followed by a number and using literal null is in some cases interpreted as end of string, escape null as \x00.
This commit is contained in:
@@ -96,7 +96,7 @@ function OutputStream(options) {
|
||||
case "\u2029": return "\\u2029";
|
||||
case '"': ++dq; return '"';
|
||||
case "'": ++sq; return "'";
|
||||
case "\0": return "\\0";
|
||||
case "\0": return "\\x00";
|
||||
}
|
||||
return s;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user