diff options
author | Anthony Van de Gejuchte <anthonyvdgent@gmail.com> | 2015-12-26 15:08:37 +0100 |
---|---|---|
committer | Anthony Van de Gejuchte <anthonyvdgent@gmail.com> | 2015-12-26 15:08:37 +0100 |
commit | 174404c0f37bf14aff23c41889e6bab1fd87c1d7 (patch) | |
tree | 88358126c47577734e7b307cfe368ed8ee831fbf | |
parent | 60c4030a4d6758e98bb534cdcfe26bebda9ddd2b (diff) | |
download | tracifyjs-174404c0f37bf14aff23c41889e6bab1fd87c1d7.tar.gz tracifyjs-174404c0f37bf14aff23c41889e6bab1fd87c1d7.zip |
Do not allow newlines in string literals
-rw-r--r-- | lib/parse.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/parse.js b/lib/parse.js index 4d06ae05..7e7b2272 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -399,6 +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 (ch == quote) break; ret += ch; } |