Don't unescape \x2f (slash) in regexps. #54
authorMihai Bazon <mihai@bazon.net>
Sat, 18 Jan 2014 10:31:50 +0000 (12:31 +0200)
committerMihai Bazon <mihai@bazon.net>
Sat, 18 Jan 2014 10:31:50 +0000 (12:31 +0200)
lib/output.js

index 37200c4..896defa 100644 (file)
@@ -1126,7 +1126,7 @@ function OutputStream(options) {
             str = str.split("\\\\").map(function(str){
                 return str.replace(/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}/g, function(s){
                     var code = parseInt(s.substr(2), 16);
-                    return code == 10 || code == 13 || code == 0x2028 || code == 0x2029 ? s : String.fromCharCode(code);
+                    return code == 0x2f || code == 10 || code == 13 || code == 0x2028 || code == 0x2029 ? s : String.fromCharCode(code);
                 });
             }).join("\\\\");
         }