diff options
Diffstat (limited to 'lib/output.js')
-rw-r--r-- | lib/output.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/output.js b/lib/output.js index 8ca0dc06..1bde822e 100644 --- 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; }; |