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

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 UTC