Closed
Bug 49449
Opened 25 years ago
Closed 25 years ago
inclusion of javascript from <script>
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
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?
Reporter | ||
Comment 1•25 years ago
|
||
Just talked to Brendan Eich who told me the truth about the javascript
engine...:)
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
Comment 2•25 years ago
|
||
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.
Description
•