public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f1f21b
)
Only encode <!-- and --> in strings when inline_script
author
Mihai Bazon
<mihai.bazon@gmail.com>
Mon, 12 Oct 2015 07:21:22 +0000
(10:21 +0300)
committer
Mihai Bazon
<mihai.bazon@gmail.com>
Mon, 12 Oct 2015 07:21:22 +0000
(10:21 +0300)
lib/output.js
patch
|
blob
|
history
diff --git
a/lib/output.js
b/lib/output.js
index
8ca0dc0
..
1bde822
100644
(file)
--- a/
lib/output.js
+++ b/
lib/output.js
@@
-125,10
+125,11
@@
function OutputStream(options) {
function encode_string(str, quote) {
var ret = make_string(str, quote);
- if (options.inline_script)
+ if (options.inline_script)
{
ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1");
- ret = ret.replace(/\x3c!--/g, "\\x3c!--");
- ret = ret.replace(/--\x3e/g, "--\\x3e");
+ ret = ret.replace(/\x3c!--/g, "\\x3c!--");
+ ret = ret.replace(/--\x3e/g, "--\\x3e");
+ }
return ret;
};