[Pkg-javascript-commits] [uglifyjs] 40/190: Only encode <!-- and --> in strings when inline_script

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Aug 7 23:17:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag upstream/2.7.0
in repository uglifyjs.

commit 17eef5a3c26bfa87879e270b1fa4743646bae559
Author: Mihai Bazon <mihai.bazon at gmail.com>
Date:   Mon Oct 12 10:21:22 2015 +0300

    Only encode <!-- and --> in strings when inline_script
---
 lib/output.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/output.js b/lib/output.js
index 8ca0dc0..1bde822 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;
     };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list