From: startswithaj Date: Thu, 15 Oct 2015 06:50:53 +0000 (+1000) Subject: Make_string was missing \v and wasnt reversing vertical tabs even though read_escaped... X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=6b2861e0861968f1f7acae5cf964cc0e6244b0be;p=UglifyJS.git Make_string was missing \v and wasnt reversing vertical tabs even though read_escaped_char coverts them --- diff --git a/lib/output.js b/lib/output.js index a3b8f1a7..933a4ce7 100644 --- a/lib/output.js +++ b/lib/output.js @@ -88,13 +88,14 @@ function OutputStream(options) { function make_string(str, quote) { var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s){ + str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s){ switch (s) { case "\\": return "\\\\"; case "\b": return "\\b"; case "\f": return "\\f"; case "\n": return "\\n"; case "\r": return "\\r"; + case "\v": return "\\v"; case "\u2028": return "\\u2028"; case "\u2029": return "\\u2029"; case '"': ++dq; return '"';