Issue metadata
Sign in to add a comment
|
Parse error for <form> elements inside a <template> element. |
||||||||||||||||||||||
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
,
Jan 23 2017
Seems a duplicate of issue 660671 , fixed in r430573 (56.0.2914.0)
,
Jan 23 2017
Yes, looks like it. It's fixed in 56.
,
Jan 24 2017
,
Jan 24 2017
Thanks for confirming it, merged with Issue 660671 as its similar to it. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by evn@google.com
, Jan 23 2017