[Bug 6125] HTML validator fails for "--" within comment blocks

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6125





--- Comment #5 from Dean Edridge <dean@dean.org.nz>  2008-09-30 04:35:31 ---
(In reply to comment #4)
> The specification is fine.
> 
> It says the comments end with "--" followed by ">", and there could be white
> spaces in between.
> 
> Which means if there is "--" but not followed by ">", it should not be
> considered as the end of the comment and the parser should continue looking for
> end of comments...
> 
> In another word, from the specification, if there are non-white space
> characters in between "--" and ">",

> it is not the end of comments and should
> not be considered illegal codes.

The spec is both HTML and XHTML, meaning that the vocabulary will/can be parsed
by both HTML and XML parsers. The HTML5 spec has been developed to have as
little as possible differences between HTML and XHTML. The sequence "--" is a
fatal error in XML which is perhaps why the editors of the spec decided to make
it non-conforming in HTML as well. 

> 
> At least the majority browsers allow the codes...

That's not really a good reason, there may be other situations where it doesn't
work correctly.

> 
> If there is no restriction on "--" followed by ">", then I could understand the
> problem, but since there is already a definitive restriction that "--" must be
> followed by ">" (with white spaces allowed in between), then all the arguments
> above impose more restrictions not specified in the specifications...
> 
> 
> Thanks
> 

If people disagree with what the spec says or don't understand the rational for
decisions such as these, they are welcome to post comments on the: 
public-html-comments@w3.org mailing list. If anyone wants to subscribe to this
list, just follow this link: http://lists.w3.org/#public-html-comments and
you'll see the options.

Also, when replying on bugzilla you're supposed to click the "reply" link along
side the last posters name, and not use the "Additional Comments:" section.
That was my mistake earlier, sorry.  

Thanks


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 30 September 2008 04:36:10 UTC