Re: HTML entities and the validator...

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:33 UTC