W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2007

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

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 19 Jun 2007 21:51:49 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.0706192137260.9154@dhalsim.dreamhost.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:56 UTC