diff options
author | Anthony Van de Gejuchte <anthonyvdgent@gmail.com> | 2015-12-27 22:24:37 +0100 |
---|---|---|
committer | Anthony Van de Gejuchte <anthonyvdgent@gmail.com> | 2015-12-27 22:24:37 +0100 |
commit | 6f3e35bb3f04303e6b7cc74cfc25bfee3c792a98 (patch) | |
tree | c450ec8e0c3b3b6097c2c2c3e0b1779cd7fad043 | |
parent | 174404c0f37bf14aff23c41889e6bab1fd87c1d7 (diff) | |
download | tracifyjs-6f3e35bb3f04303e6b7cc74cfc25bfee3c792a98.tar.gz tracifyjs-6f3e35bb3f04303e6b7cc74cfc25bfee3c792a98.zip |
Fix ch that could contain other newline characters
-rw-r--r-- | lib/parse.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parse.js b/lib/parse.js index 7e7b2272..2218c00c 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -399,7 +399,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) { if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8)); else ch = read_escaped_char(true); } - else if (ch == "\n") parse_error("Unterminated string constant"); + else if ("\r\n\u2028\u2029".indexOf(ch) >= 0) parse_error("Unterminated string constant"); else if (ch == quote) break; ret += ch; } |