W3C home > Mailing lists > Public > www-validator@w3.org > July 2010

Re: Validator fails on PHP instructions inside attribute values

From: Philip Taylor (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
Date: Mon, 19 Jul 2010 13:38:50 +0100
Message-ID: <4C44475A.3000604@Rhul.Ac.Uk>
To: David Dorward <david@dorward.me.uk>
CC: Richard Ishida <ishida@w3.org>, www-validator@w3.org

David Dorward wrote:
> On 19 Jul 2010, at 13:17, Richard Ishida wrote:
>> What follows is the output of a validation session.  The validator seems to cope fine with php PIs other than inside attribute values.  Please recognise these as PIs and allow the file to be validated.
> The markup validator validates markup, not PHP source code that generates markup.
> Run the software you have written and validate the output.
> Trying to deal with the PHP code would be, for the simplest cases, impractical and vulnerable to false positives and negatives. For more complex cases it would be a security hazard.

Although I have considerable sympathy with this position (it was
also my own immediate reaction), I note that the HTML 4.0 specification
does in fact recognise the concept of a Processing Instruction (PI) :


I haven't yet had a chance to work out whether this "recognition"
is sufficient for an otherwise-valid document containing valid PIs
to therefore qualify as valid itself.

Philip Taylor
Received on Monday, 19 July 2010 12:39:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:31:04 UTC