W3C home > Mailing lists > Public > public-html@w3.org > May 2009

Re: Parsing: "<" inside tags

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 6 May 2009 18:49:06 +0000 (UTC)
To: Simon Pieters <simonp@opera.com>
Cc: "public-html@w3.org" <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0905061846390.7824@hixie.dreamhostps.com>
On Wed, 6 May 2009, Simon Pieters wrote:
> 
> Maybe the spec should make "<" in unquoted attributes and in attribute 
> names a syntax error in order to catch authoring mistakes like the 
> following:
> 
>   <div class=foo<p>bar</p></div>
> 
> 
>   <div class=foo
>    <p>bar</p>
>   </div>
> 
> (Validators would issue other errors for those but they are not so 
> helpful for identifying the actual mistake.)

It's an unfortunate error, but because of the upcoming doc="" attribute I 
don't think we want to require < to be escaped in attributes.


> See http://bugzilla.validator.nu/show_bug.cgi?id=504

Shouldn't the first case say the <p attribute is invalid, thus pointing 
right to the location of the error?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 6 May 2009 18:49:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:34 GMT