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

Re: HTML entities and the validator...

From: Philip Taylor (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
Date: Sat, 23 Apr 2011 15:05:30 +0100
Message-ID: <4DB2DCAA.3040908@Rhul.Ac.Uk>
CC: sierkb@gmx.de, www-validator Community <www-validator@w3.org>

sierkb@gmx.de wrote:
 > Hi!
 > Question: is there, by any means, anywhere, a definition, if in HTML (concrete: HTML 4.01) and/or it's parent, SGML, it's allowed and valid to shorten an entity (like&amp;) to "&;" (Ampersant + Semikolon) in a given<a href="URL">  with&; instead of&amp;" within an URL construct, so that the W3C Markup Validator is right, in NOT labeling it as an error and let passing it as valid?
 > Meaning: is it by any means correct and valid, to use "&;" instead of masking a "&" with"&amp;" in a given URL? When NOT valid, why does the W3C Markup Validator say so, while parsing/validating against HTML 4.01 Strict  -- and in contrast (and my expectation) throws an (from my point of view expectable and correct) error, when parsing/validating against XHTML 1.0 Strict while sticking to the Mimetype text/html)?
 > Validating such an URL against HTML5 also throws an error message. But not so if validated as/against HTML 4.01.

I think you are conflating two unrelated questions :

1) Is &; valid ?
2) Does &; represent &amp; ?

I suspect that the answer to the former is "yes",
and to the latter "no".

Philip Taylor
Received on Saturday, 23 April 2011 14:05:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:03 UTC