Closed Bug 49449 Opened 25 years ago Closed 25 years ago

inclusion of javascript from <script>

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

VERIFIED WONTFIX

People

(Reporter: bugzilla, Assigned: rogerl)

Details

IF you have a inc.js file that look like this: document.write('<a href="http://gemal.dk">gemal.dk</a>'); and you have test.html file that look like this: <script> document.writeln('<script src="x.js"></script>'); </script> you get an error. BUT if you do it like this: <script> document.writeln('<script src="x.js"></scr'+'ipt>'); </script> it works! Is this correct?
Just talked to Brendan Eich who told me the truth about the javascript engine...:)
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
Verifiying - The point seems to be this: the HTML parser interprets the first "</script>" it sees as the end of the JS script block. Therefore, the inner end-script tag should be escaped as "<\/script>", and everything will work fine -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.