W3C home > Mailing lists > Public > www-validator@w3.org > April 2008

Re: Javascript "for" Statement and AJAX "Query String"

From: David Dorward <david@dorward.me.uk>
Date: Sat, 26 Apr 2008 09:23:08 +0100
Cc: www-validator@w3.org
Message-Id: <B259AD98-5364-48E7-AFE5-E4AAC2868B21@dorward.me.uk>
To: Yotam Haran <yotamharan2@gmail.com>

On 25 Apr 2008, at 22:20, Yotam Haran wrote:

> It seems that the validator insists on reading the "for" statement  
> I've got in my javascript as HTML, and it throws out an amazing  
> amount of errors because of it. Can't something be done about it? As  
> long as the problem persists, I can't get my page validated properly.
> EXAMPLE URL: http://innovative.mithraslive.com?action=profile&user=dogmona

This is correct behaviour on the part of the validator. Since your  
XHTML is masquerading as HTML, see http://www.w3.org/TR/xhtml1/#C_4

> As for the AJAX problem, the string that I send out to the server  
> includes ampersands in it, and the validator throws out errors about  
> it too.

Same issue.

> Isn't it possible to make the validator somehow ignore ampersands  
> inside javascript tags, seeing as they're often used for various  
> syntax purposes?

It is theoretically possible, but the point of the validator is to  
find validity errors, not cover them up.

David Dorward
Received on Saturday, 26 April 2008 08:23:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:07 UTC