Closed Bug 21944 Opened 25 years ago Closed 25 years ago

Including the string "</SCRIPT>" in JavaScript parses wrong

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED WONTFIX

People

(Reporter: brettw, Assigned: rickg)

References

()

Details

If you have the string "</SCRIPT>" in some Javascript, the parser will think its
the end of the script and stop interpreting it as Javascript. The rest of the
script will be displayed as HTML. Fixing this might require the HTML parser to
understand some JavaScript...

Breaks for me on M11 on both NT and Linux.

Here is the test page above in case the link doesn't work:

<html><head><script language="JavaScript"><!--
if( 0 )
{
	document.write("<SCRIPT LANGUAGE='JavaScript1.2'
SRC='asdf.js'></SCRIPT>");
	document.write("This shouldnt display.");
}
--></script></head><body></body></html>
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → WONTFIX
Script is CDATA. The parser should stop once it see "</SCRIPT>". If you need to
include that in your markup, you need to escape it.
Script is CDATA. The parser should stop once it see "</SCRIPT>". If you need to
include that in your markup, you need to escape it.
Status: RESOLVED → VERIFIED
Marking verified wont fixe per last comments.
this is an exact duplicate of 7590
SPAM. HTML Element component deprecated, changing component to Layout. See bug
88132 for details.
Component: HTML Element → Layout
You need to log in before you can comment on or make changes to this bug.