Re: Meta - Escaped quote should be OK - HTML4 strict (email)

2013-03-14 15:40, Denis TRUFFAUT wrote:

>          <meta name='description' content='\''>
[...]
> ... Fails
>
> The only difference is the &#039; transformed into \'
>
> Escaped quotes should be considered as valid.

No, \' is not an escaped quote in HTML. Whatever it might mean in other 
languages and notations (including some that might be used to generate 
an HTML document or as embedded in an HTML document), in HTML \' is 
simply two separate characters with no special meaning.

Hence, when \' occurs in an attribute value within single quotes (i.e., 
Ascii apostrophes, '), the single quote is invalid quite independently 
of the character before it. Or, in terms of parsing, the single quote 
terminates the attribute value, leaving the next single quote (that was 
meant to terminate the value) homeless and, in this context, invalid.

P.S. There should seldom be any need for using the Ascii apostrophe 
within a content attribute. The Ascii apostrophe is used in computer 
languages, but a meta description is supposed to be in a human language, 
with e.g. “don’t” rather than “don't”.

Yucca

Received on Friday, 15 March 2013 08:41:51 UTC