Closed
Bug 256153
Opened 20 years ago
Closed 20 years ago
The wrong description of the closing tag </script>.
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
People
(Reporter: nick, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 If there is a </script> line contained inside the script tag in the comments or in the Javascript code, then Mozilla browser interprets it as a closing tag </script> but not as a part of the javascript. Even despite the presence of comments around <!-- //-->. At the same time, everything works fine if you set <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> instead of <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN""">http://www.w3.org/TR/html4/frameset.dtd"> Reproducible: Always Steps to Reproduce: <script type="text/javascript"><!-- // It's comment // </script> alert("hi"); //--> </script> or <script type="text/javascript"><!-- var my_text = '</script>'; alert("hi"); //--> </script>
Comment 2•20 years ago
|
||
The first DOCTYPE triggers quirks mode, the second triggers standards compliance mode. (see http://www.mozilla.org/docs/web-developer/quirks/) Try using '</scr'+'ipt>' instead. *** This bug has been marked as a duplicate of 32618 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Comment 3•20 years ago
|
||
David, maybe we should add this one to the quirks list? http://lxr.mozilla.org/seamonkey/source/parser/htmlparser/src/nsHTMLTokens.cpp#558
You need to log in
before you can comment on or make changes to this bug.
Description
•