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)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 32618

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>
Dup of bug 32618?
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
You need to log in before you can comment on or make changes to this bug.