<?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>18367</bug_id>
          
          <creation_ts>2012-07-23 23:07:54 +0000</creation_ts>
          <short_desc>Spec causes continuous loop</short_desc>
          <delta_ts>2012-10-21 22:25:34 +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>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mridul">mridul</reporter>
          <assigned_to name="Silvia Pfeiffer">silviapfeiffer1</assigned_to>
          <cc>mike</cc>
    
    <cc>mridul</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>silviapfeiffer1</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>71335</commentid>
    <comment_count>0</comment_count>
    <who name="Mridul">mridul</who>
    <bug_when>2012-07-23 23:07:54 +0000</bug_when>
    <thetext>Consider the stack of open elements to be :
html, body, form, table, tbody

(form being present is irrelevant to this imo).

The current insertion mode is IN TABLE BODY as expected.


When the next token being consumed is end tag p, then the parser will go into an infinite loop.

IN TABLE BODY will delegate to IN TABLE, which will delegate to IN BODY with foster parenting enabled.
The end tag p will cause a &apos;act as if&apos; start token for p (since there is no P in button scope) - which will go through same flow to end in IN BODY with foster parenting enabled.
The resulting insertion of p tag due to then token will get foster parent&apos;ed - and so, on return, reconsumption of end tag p will essentially cause the same loop to be repeated indefinitely.


If our understanding of the spec, as detailed above, is incorrect - that would be great ! Please do let us know.


Thanks,
Mridul</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71386</commentid>
    <comment_count>1</comment_count>
    <who name="Mridul">mridul</who>
    <bug_when>2012-07-24 14:34:41 +0000</bug_when>
    <thetext>Looks like even when foster parent&apos;ed, the node to be inserted must be pushed to open elements stack - might be good to clarify this since we figured it out via trial and error.

Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76271</commentid>
    <comment_count>2</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-10-15 05:09:24 +0000</bug_when>
    <thetext>Reopening, so I can apply the patch of cloned WHATWG bug 18473 to the W3C spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76852</commentid>
    <comment_count>3</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-10-21 22:25:34 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If
you are satisfied with this response, please change the state of
this bug to CLOSED. If you have additional information and would
like the Editor to reconsider, please reopen this bug. If you would
like to escalate the issue to the full HTML Working Group, please
add the TrackerRequest keyword to this bug, and suggest title and
text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this
document:   http://dev.w3.org/html5/decision-policy/decision-policy-v2.html

Status: Accepted

Change Description:
https://github.com/w3c/html/commit/2758f0e460f26cdf2fb510e26062eb7f5c17f171

Rationale: Adopted WHATWG patch</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>