- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Fri, 15 Mar 2013 10:37:10 +0200
- To: Denis TRUFFAUT <denis.truffaut@gmail.com>
- CC: www-validator@w3.org
2013-03-14 15:40, Denis TRUFFAUT wrote: > <meta name='description' content='\''> [...] > ... Fails > > The only difference is the ' 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