W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2005

[whatwg] [WA1] INS/DEL and omitted </p> tags

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 24 Nov 2005 21:39:33 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0511242121370.9929@dhalsim.dreamhost.com>
On Thu, 24 Nov 2005, Simon Pieters wrote:
> 
> Omitted </p> tags seems to be a bit of an issue in combination with INS 
> and DEL elements.

Indeed.


> How should a UA parse the following markup snippet?
> 
> <p>foo<ins><p>bar</ins>

It should be parsed as:

  <p>
    foo
    <ins>
    </ins>
  </p>
  <p>
    bar
  </p>

Note that this is an invalid snippet.


> The following is what browsers do now:
> 
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
> <P>foo<INS><P>bar</INS></P>
> innerHTML for the first P: foo<INS>
> innerHTML for INS: <P>bar
> innerHTML for the second P: bar</INS>

This is quite clearly insane...


> Opera/9.0 (Windows NT 5.1; U; en)
> <P>foo<INS></INS></P><P>bar</P>
> 
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051120
> Firefox/1.6a1
> <p>foo<ins><p>bar</p></ins></p>

And Safari does what Opera does, which is why it's correct. If either 
Opera or Safari changed to match what Mozilla does, then that would be 
correct instead. :-)

Basically, when the parsing section gets written, it'll be written to 
match the behaviour that the most browsers do.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 24 November 2005 13:39:33 UTC

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