[whatwg] Parsing: </li> should be ignored

On Sat, 14 Apr 2007, Simon Pieters wrote:
>
> For compatibility with IE the parsing algorithm should probably ignore 
> </li> tags.
> 
> Test case for the above proposal:
> 
>   <!doctype html>
>   <style>
>   * { margin:0; padding:0; }
>   ul { background:red; }
>   li { background:lime; }
>   </style>
>   <ul><li></li>This line should be green.</ul>

I've thought this over and as much as I'd like to be compatible with IE on 
this, there are a number of issues with it.

There's the way that every other browser doesn't do this, which makes it a 
very risky change. It also means there may not be an immediate need to do 
this, since browsers only tend to disagree with IE when doing so doesn't 
break much content.

There's the problem that it makes it difficult to know how to handle 
things like:

   <ul><li>test</li><!--test--></ul>

It would also make future expansion difficult, too. This would have to be 
applied to <dt> and <dd>, and would make constructions like:

   <x> <dt> xx </dt> xx <dd> xx <li> xx </li> xx </dd> xx </x>

...have very different results than it appears.

So, unless there's a strong reason to, I suggest we don't change this.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 19 June 2007 14:51:49 UTC