This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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 'act as if' 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'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
Looks like even when foster parent'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.
Reopening, so I can apply the patch of cloned WHATWG bug 18473 to the W3C spec.
EDITOR'S RESPONSE: This is an Editor'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