Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML parser: make breaking out of foreign content apply in innerHTML #6399

Merged
merged 1 commit into from
Mar 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -111047,23 +111047,12 @@ document.body.appendChild(text);
<dd>
<p><span>Parse error</span>.</p>

<!-- for sanity's sake, we limit this wacked quirk to legacy full-document parsing, not to
innerHTML. We have no data showing whether (or that) this is needed for innerHTML. If innerHTML
is used on an SVG or MathML node, it definitely doesn't make any sense (there's nothing to pop
to in the first place). Therefore, rather than trying to figure out in what convoluted
conditions we could actually do this quirk for innerHTML, we just don't do it at all. -->
<p>While the <span>current node</span> is not a <span>MathML text integration point</span>, an
<span>HTML integration point</span>, or an element in the <span>HTML namespace</span>, pop
elements from the <span>stack of open elements</span>.</p>

<p>If the parser was created as part of the <span>HTML fragment parsing algorithm</span>, then
act as described in the "any other start tag" entry below. (<span>fragment case</span>)</p>

<p>Otherwise:</p>

<p>Pop an element from the <span>stack of open elements</span>, and then keep popping more
elements from the <span>stack of open elements</span> until the <span>current node</span> is a
<span>MathML text integration point</span>, an <span>HTML integration point</span>, or an
element in the <span>HTML namespace</span>.</p>

<p>Then, reprocess the token.</p>
<p>Process the token <span>using the rules for</span> the "<span data-x="insertion mode:
in body">in body</span>" <span>insertion mode</span>.</p>
</dd>

<dt>Any other start tag</dt>
Expand Down