Parsing: <applet>, scoping element or not

A page (a Sun tutorial on <applet> that is now gone) broke in Opera  
because it had markup like:

    <p>
     <applet>
      <p><center></center></p>
      Blah
     </applet>
    </p>

...and we parse it as if it were:

    <p>
     <applet>
      <p></p><center></center></applet></p>
      Blah
    <p></p>

Per HTML5 currently it should be parsed as if it were:

    <p>
     <applet>
      </applet></p><p></p><center></center><p></p>
       Blah
    <p></p>

The net result in both Opera's case and HTML5 is that the applet and the  
text "Blah" are both shown, which is not what was intended.

It appears that in IE and Firefox (but not Safari), applet is a "scoping  
element" just like object.

I don't know how many pages break because of this, but perhaps HTML5  
should align with IE and Firefox here.

-- 
Simon Pieters
Opera Software

Received on Wednesday, 27 February 2008 19:16:35 UTC