Invoking the fragment parsing algorithm with an RCDATA context node should leave the appropriate end tag as undefined

NEW
Unassigned

Status

()

7 years ago
3 years ago

People

(Reporter: hsivonen, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

7 years ago
See http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1084

The substring "</title>" is lost in Gecko but not in Ragnarök or Chrome. The fragment parsing algorithm steps in the spec don't have a step for setting the appropriate end tag, so the parser in Gecko shouldn't be setting it.
I make test for all elements listed for HTML fragment parsing (https://html.spec.whatwg.org/multipage/syntax.html#html-fragment-parsing-algorithm):
<html>
<script>

	var elements = ["title", "textarea", "style", "xmp", "iframe", "noembed", "noframes", "script", "noscript", "plaintext"];

	elements.forEach(function(localName){
		var el = document.createElement(localName);
		el.innerHTML = "foo&amp;bar&auml;<tag></endtag> But the <\/" + localName + "> end tag disappears.";
		console.log(localName + ": " + el.textContent);
 });

</script>
</html>

And results:
Firefox is wrong for title, textarea, xmp, iframe, noembed, noframes, noscript
Blink/Edge/IE11/Presto are correct for all
You need to log in before you can comment on or make changes to this bug.