W3C home > Mailing lists > Public > www-validator@w3.org > March 2013

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

From: tlvp <misc.tlvp@att.net>
Date: Thu, 14 Mar 2013 22:24:09 -0400
To: www-validator@w3.org
Message-ID: <11memu4jd408t$.1wtsh5daayxx1.dlg@40tude.net>
On Thu, 14 Mar 2013 14:40:58 +0100, Denis TRUFFAUT wrote:

> ... But :
> 
> <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' '
> http://www.w3.org/TR/html4/strict.dtd'>
> <html>
>     <head>
>         <title></title>
>         <meta name='description' content='\''>
>     </head>
>     <body>
>         <div></div>
>     </body>
> </html>
> 
> .... Fails

Read that "content= ... " line like a parser would:
it meets an opening ' ;
it meets a \ ;
it meets a closing ' ;
so it's ready to think "ah-hah: attribute content is set to \ " .
And then it meets an extraneous additional ' .
It has no idea you meant the second ' as anything other than the closing
complement of the opening ' quote, so it throws a well-deserved snit :-) .

> Escaped quotes should be considered as valid.

They are. You want the escaped quote \' as value here?
Use a pair of quotes *other* than that one -- e.g., " -- to delimit it:

:          <meta name='description' content="\'">

See if that's not less of a failure :-) . HTH. Cheers, -- tlvp
-- 
Avant de repondre, jeter la poubelle, SVP.
Received on Friday, 15 March 2013 02:24:48 GMT

This archive was generated by hypermail 2.3.1 : Friday, 15 March 2013 02:24:50 GMT