From e38b5a70e8e19f9cc95dd0ad35193d828db132bc Mon Sep 17 00:00:00 2001 From: Ben Ng Date: Thu, 15 Aug 2013 17:26:48 -0700 Subject: [PATCH] Add missing char to to_ascii --- lib/output.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/output.js b/lib/output.js index a7b5e21c..49c93c9a 100644 --- a/lib/output.js +++ b/lib/output.js @@ -80,11 +80,12 @@ function OutputStream(options) { while (code.length < 4) code = "0" + code; return "\\u" + code; } - }); + }).replace(/\x0B/g, "\\x0B"); }; function make_string(str) { var dq = 0, sq = 0; + str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){ switch (s) { case "\\": return "\\\\";