Open Bug 1514499 Opened 2 years ago Updated 2 years ago
Serialize the children of void elements as the empty string
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0 Steps to reproduce: Firefox and Chrome/Safari have different behaviour when serializing the innerHTML of void elements if they have children. Chrome and Safari return the empty string, while Firefox returns the serialized child nodes. Firefox's behaviour follows the current specification, but a change to the HTML fragment serialization algorithm in https://github.com/whatwg/html/pull/4238 will align the specification with the implementations in Chrome and Safari instead. There are tests for this in https://github.com/web-platform-tests/wpt/blob/master/html/syntax/serializing-html-fragments/serializing.html.
Spec change has been merged; see https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments
You need to log in before you can comment on or make changes to this bug.