<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5836</bug_id>
          
          <creation_ts>2008-07-06 19:36:55 +0000</creation_ts>
          <short_desc>Syntax section allows &lt;ins&gt;&lt;p&gt;&lt;/ins&gt;</short_desc>
          <delta_ts>2010-10-04 14:47:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21072</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2008-07-06 19:36:55 +0000</bug_when>
    <thetext>The syntax section says:

&quot;A p element&apos;s end tag may be omitted ... if there is no more content in the parent element.&quot;

Which allows for:

&lt;ins&gt;&lt;p&gt;&lt;/ins&gt;
&lt;del&gt;&lt;p&gt;&lt;/del&gt;
&lt;math&gt;&lt;mi&gt;&lt;p&gt;&lt;/mi&gt;&lt;/math&gt;
&lt;!--&lt;svg&gt;&lt;foreignobject&gt;&lt;p&gt;&lt;/foreignobject&gt;&lt;/svg&gt;--&gt;

...all of which I think result in parse errors.

It should say something like &quot;... if there is no more content in the parent element and the parent element is not ins, del, or in the MathML &lt;!--or SVG--&gt; namespace.&quot;

(Add &lt;a&gt; to that list when we allow blocks in &lt;a&gt;.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21073</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-07-06 22:05:01 +0000</bug_when>
    <thetext>I didn&apos;t want those to be parse errors. Can we fix that somehow?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21074</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-07-06 22:29:44 +0000</bug_when>
    <thetext>Wait, why are they parse errors?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21077</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2008-07-06 23:29:48 +0000</bug_when>
    <thetext>I guess because two browsers (Opera and Safari) agreed on what the DOM should look like. (IE creates a malformed tree, Firefox closes the P. Opera&apos;s rendering also doesn&apos;t match the DOM.)

I&apos;d be fine with the Firefox behavior for &lt;ins&gt;&lt;p&gt;&lt;/ins&gt;x (while keeping the Safari behavior for &lt;p&gt;&lt;ins&gt;&lt;p&gt;) and using that for &lt;mi&gt;/&lt;foreignobject&gt; too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21078</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-07-06 23:36:21 +0000</bug_when>
    <thetext>No, I mean, where does the spec cause these to be parse errors? Which line is triggering the parse error?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21079</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2008-07-07 00:34:20 +0000</bug_when>
    <thetext>Ah. I wasn&apos;t reading the spec, I just assumed that html5lib was correct. :-)

It seems the spec says to first &quot;Set node to the previous entry in the stack of open elements.&quot; and then generate implied end tags for the p, and so this isn&apos;t a parse error per spec and the above snippets don&apos;t parse into what I had expected. (I expected the P to not be closed.)

However the spec disagrees with browsers for how to parse &lt;foo&gt;&lt;p&gt;1&lt;/foo&gt;2, but I guess we&apos;ll see whether this breaks anything...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>