don't escape null characters as \0 when followed by any digit (#2273)
fixes #2272
This commit is contained in:
committed by
Alex Lam S.L
parent
e7c21e87e3
commit
16d40915b4
@@ -146,7 +146,7 @@ function OutputStream(options) {
|
||||
case "\u2029": return "\\u2029";
|
||||
case "\ufeff": return "\\ufeff";
|
||||
case "\0":
|
||||
return /[0-7]/.test(str.charAt(i+1)) ? "\\x00" : "\\0";
|
||||
return /[0-9]/.test(str.charAt(i+1)) ? "\\x00" : "\\0";
|
||||
}
|
||||
return s;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user