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

Re: Possible validator bug with JavaScript

From: olivier Thereaux <ot@w3.org>
Date: Tue, 8 May 2007 17:40:12 -0400
Message-Id: <F8E4F7FE-8B71-4C50-A35E-1300CF554676@w3.org>
Cc: www-validator@w3.org
To: shen@cse.ust.hk

Hi Vincent,

On May 8, 2007, at 13:54 , shen@cse.ust.hk wrote:
> The attached HTML file should be valid, but the validator
> reached into the JavaScript literal and found a problem,
> when there is none. Sample code is attached for your testing.

The problem which the validator spotted is a common issue with  
creating valid markup when using javascript in a certain way,  
especially with document.write(). The error message given by the  
validator points to the following FAQ:
http://www.htmlhelp.com/tools/validator/problems.html
which itself mentions the HTML specification:
http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2.1

> I think the validator should skip JavaScript code completely,
> unless it has a built-in JavaScript interpretor.

This is not for us to decide, the validator is merely following the  
specifications, here.

Regards,
-- 
olivier
Received on Tuesday, 8 May 2007 21:40:18 GMT

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