Re: Some bug report on markup-validator

>> Jiku Lee wrote:
>>
>> I ask you for some bug on markup-validator.
>>
>> I think the webpage below is well-formed, but validator displays error
>> messages.
>>
>> Maybe the reason of error related to my domain name, i--i.com and
>> javascript comment tag '<!--'
>>
>> URL
>> http://www.i--i.com/archives/category/photo-story/

> Benjamin Niemann <pink@odahoda.de> wrote:
>
> The validator is correct, it's not a bug. You a using XHTML and wrapping
> your JavaScript code in <!-- and -->. An XHTML parser will completely
> ignore the commented section (your also using <![CDATA, but inside of the
> comment...) - but in this case the comment is ended by the '--'
> in 'i--i.com', resulting in the errors you saw.
> Don't use <!-- ... --> in SCRIPT or STYLE elements - I doubt there's a
> user-agent around that still does not know how to parse SCRIPTs and  
> STYLEs.
> So the 'bug' is in your document and it is in fact triggered by the  
> comment
> and the occurence of the domain name inside of it.

While I agree that there's little or no reason these days to comment-out  
code, I don't think it makes much sense to assume that a comment has ended  
just because a "--i" sequence is encountered. Last time I checked, "i" is  
not the character used to close tags. Does this mean the "--" sequence  
cannot exist inside comments?

This seems like either a bug in the validator or a "bug" in the way the  
comment closing tag is defined.

RMN
~~~

Received on Tuesday, 23 January 2007 20:17:31 UTC