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

Ian Hickson ian at hixie.ch
Thu Nov 24 13:39:33 PST 2005


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.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list