This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23597 - Issue message whenever </script> does *not* end the script eleent.
Summary: Issue message whenever </script> does *not* end the script eleent.
Status: NEW
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P3 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on: 23587
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-22 18:27 UTC by Leif Halvard Silli
Modified: 2016-03-10 04:57 UTC (History)
7 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2013-10-22 18:27:30 UTC
See bug #23587. 

Example fragment:

    <script><!--<script></script>

If, inside script, the validator sees the string “<script>” preceded by the string ”<!--”, the validator should inform its users that the first occurrence of the end tag (or string) </script> will be ignored/does not end the element.

This message should come *in addition* to the current messages.

Why should the validator give such a message? 

FIRSTLY: For the code
    <script><!--<script></script>
then most authors will expect the same result as for the code 
    <script><!--</script>
namely, that the script element will close as soon as the first </script> string occurs. This can be justified e.g. by pointing to </style>, which in the same situation behaves that way.

SECONDLY, Jakub Łopuszański’s example code in bug #23587
    <script><!--<script></script><!--cmt--><script></script>
looks like 3 items - a script, a comment and yet another script. And if you test it in the NU validator, it will tell you that it is valid. However, the problem is that NU validator considers those 3 nodes to be a single script element which, again, is against authors’ expections.

THIRDLY, consequently, we must say that for "<!--<script>", then, due to authors’ expectations, the validator does not always offer optimal validation, sometimes it is even unreliable, and this unreliability should be highlighted for the validator user.