From 4339bd5cfa16e6293060ca09b5fb1d37a676df83 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Sat, 18 Jan 2014 12:31:50 +0200 Subject: [PATCH] Don't unescape \x2f (slash) in regexps. #54 --- lib/output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/output.js b/lib/output.js index 37200c40..896defa3 100644 --- a/lib/output.js +++ b/lib/output.js @@ -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("\\\\"); } -- 2.34.1