W3C home > Mailing lists > Public > www-validator@w3.org > January 2007

Re: Some bug report on markup-validator

From: Benjamin Niemann <pink@odahoda.de>
Date: Tue, 23 Jan 2007 20:23:41 +0100
To: www-validator@w3.org
Message-ID: <ep5nbv$ep0$1@sea.gmane.org>

Hello,

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/

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.

HTH

-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Received on Tuesday, 23 January 2007 20:08:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:23 GMT