[whatwg] Parsing: < in unquoted attribute values

On Wed, 25 Apr 2007 09:53:10 +0200, Anne van Kesteren <annevk at opera.com>  
wrote:
> On Wed, 25 Apr 2007 00:03:40 +0200, Simon Pieters <zcorpan at gmail.com>  
> wrote:
>> The parsing section says that < in an unquoted attribute value  
>> terminates the tag. However, according to my testing[1], IE7, Gecko,  
>> Opera and Webkit don't do this -- they append the < to the attribute  
>> value. So I think the parsing section is wrong here.
>
> IE also lets < be an attribute. It can also be part of an attribute or  
> element name. This means that:
>
>    <p</p>test
>
> will become a 'p<' element with a 'p' attribute which has 'test' as  
> textContent. This basically means less exceptions in the tokenizer for  
> the '<' character which would be fine with me.

As I just mentioned on IRC, this essentially means removing the SHORTTAG  
TAGC OMISSION feature of SGML which appears not be supported by Internet  
Explorer, Opera and maybe Safari.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Wednesday, 25 April 2007 01:29:57 UTC