public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
188e28e
)
Escape null characters as \x00
author
Ville Lautanala
<lautis@gmail.com>
Mon, 3 Jun 2013 17:18:42 +0000
(20:18 +0300)
committer
Ville Lautanala
<lautis@gmail.com>
Mon, 3 Jun 2013 17:46:42 +0000
(20:46 +0300)
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.
lib/output.js
patch
|
blob
|
history
diff --git
a/lib/output.js
b/lib/output.js
index
60a4a26
..
dc78a5d
100644
(file)
--- a/
lib/output.js
+++ b/
lib/output.js
@@
-96,7
+96,7
@@
function OutputStream(options) {
case "\u2029": return "\\u2029";
case '"': ++dq; return '"';
case "'": ++sq; return "'";
- case "\0": return "\\0";
+ case "\0": return "\\
x0
0";
}
return s;
});