From 1d271f20a3a56a4dbd33b2c7af4fa12df45b1883 Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Fri, 19 Feb 2021 14:27:18 +0100 Subject: [PATCH] HTML parser: make breaking out of foreign content apply in innerHTML This is intended to match Chromium and WebKit. Fixes #5117. --- source | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/source b/source index 6dbc4a97554..48e2c9a012b 100644 --- a/source +++ b/source @@ -111047,23 +111047,12 @@ document.body.appendChild(text);

Parse error.

- +

While the current node is not a MathML text integration point, an + HTML integration point, or an element in the HTML namespace, pop + elements from the stack of open elements.

-

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

- -

Otherwise:

- -

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

- -

Then, reprocess the token.

+

Process the token using the rules for the "in body" insertion mode.

Any other start tag