Closed
Bug 249898
Opened 21 years ago
Closed 21 years ago
"unterminated string literal" error because of newline in string
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: johnfivealive, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040620 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040620 Firefox/0.8.0+
The following code causes the error to be detected by the JS debugger:
authors[18] = new Author( 8431, "", "", "By
Alan Pelz-Sharpe, VP - Software & Services", "2004-07-05 15:57:16",
"2004-07-05 15:57:16" );
Reproducible: Always
Steps to Reproduce:
1. in an inline script execute code similar to the above
2. you should get an error in the JS debugger which says "unterminated string
literal"
Actual Results:
I get a JS error
Expected Results:
This shouldn't happen, the JS engine should be able to parse the string
regardless of the newline character after the word "By"
Comment 1•21 years ago
|
||
See ECMA-262 Edition 3 7.8.4, in particular the "but not" clauses qualifying the
right parts of the lexical productions for the DoubleStringCharacter and
SingleStringCharacter non-terminals.
This has never worked in any Netscape or Mozilla implementation, and I don't
believe it works as the reporter wants in any other browser.
/be
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•