New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 683888 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 660671
Owner: ----
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Parse error for <form> elements inside a <template> element.

Project Member Reported by koto@google.com, Jan 23 2017

Issue description

Chrome Version       : 55.0.2883.87
OS Version: Ubuntu 14.04.5 LTS
URLs (if applicable) : - 
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
  Firefox: 50.1.0 OK

What steps will reproduce the problem?
1. Open data:text/html,<script>t = document.createElement('template');t.innerHTML = '<form action=foo></form><form action=bar></form>baz';console.log(t.content)</script>
2. Look into the console and inspect the logged document fragment

What is the expected result?

The forms foo and bar are not nested.

What happens instead of that?

The form bar is nested in the foo form, with the closing form elements being appended to the end of fragment.

This parsing flaw happens only when parsing within the <template> elements i.e. it does not happen for document.implementation.createHTMLDocument() or data:text/html documents. It looks like an implementation error of

https://html.spec.whatwg.org/#reset-the-form-owner

See also:

https://html.spec.whatwg.org/#the-element-pointers (form element pointers are ignored in template elements)
https://html.spec.whatwg.org/#creating-and-inserting-nodes


UserAgentString: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36



 

Comment 1 by evn@google.com, Jan 23 2017

Cc: pelizzi@google.com

Comment 2 by woxxom@gmail.com, Jan 23 2017

Seems a duplicate of  issue 660671 , fixed in r430573 (56.0.2914.0)

Comment 3 by koto@google.com, Jan 23 2017

Yes, looks like it. It's fixed in 56.
Labels: Needs-Triage-M55
Mergedinto: 660671
Status: Duplicate (was: Unconfirmed)
Thanks for confirming it, merged with  Issue 660671  as its similar to it.

Sign in to add a comment