diff options
author | Mihai Bazon <mihai@bazon.net> | 2014-01-18 12:31:50 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2014-01-18 12:31:50 +0200 |
commit | 4339bd5cfa16e6293060ca09b5fb1d37a676df83 (patch) | |
tree | 395277707344f1218266b6e18a2ea5902a9eb3a7 | |
parent | 1ab2fdaa105b4a3f899e190218d6720982cf501b (diff) | |
download | tracifyjs-4339bd5cfa16e6293060ca09b5fb1d37a676df83.tar.gz tracifyjs-4339bd5cfa16e6293060ca09b5fb1d37a676df83.zip |
Don't unescape \x2f (slash) in regexps. #54
-rw-r--r-- | lib/output.js | 2 |
1 files changed, 1 insertions, 1 deletions
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("\\\\"); } |