[Webkit-unassigned] [Bug 189431] CDATA section are not supported in SVG/MathML in HTML
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 18 08:40:55 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=189431
Anne van Kesteren <annevk at annevk.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |annevk at annevk.nl
--- Comment #4 from Anne van Kesteren <annevk at annevk.nl> ---
I looked into fixing this and as a start I commented on https://github.com/whatwg/html/issues/4015.
Here's the patch I have, but I would like the standards discussion to conclude:
diff --git a/Source/WebCore/html/parser/HTMLTreeBuilder.cpp b/Source/WebCore/html/parser/HTMLTreeBuilder.cpp
index c138725bb0f0..f63339ac6a35 100644
--- a/Source/WebCore/html/parser/HTMLTreeBuilder.cpp
+++ b/Source/WebCore/html/parser/HTMLTreeBuilder.cpp
@@ -337,13 +337,13 @@ void HTMLTreeBuilder::constructTree(AtomHTMLToken&& token)
else
processToken(WTFMove(token));
- bool inForeignContent = !m_tree.isEmpty()
- && !isInHTMLNamespace(adjustedCurrentStackItem())
+ auto inForeignNamespace = !m_tree.isEmpty() && !isInHTMLNamespace(adjustedCurrentStackItem());
+ m_parser.tokenizer().setShouldAllowCDATA(inForeignNamespace);
+
+ auto inForeignContent = inForeignNamespace
&& !HTMLElementStack::isHTMLIntegrationPoint(m_tree.currentStackItem())
&& !HTMLElementStack::isMathMLTextIntegrationPoint(m_tree.currentStackItem());
-
m_parser.tokenizer().setForceNullCharacterReplacement(m_insertionMode == InsertionMode::Text || inForeignContent);
- m_parser.tokenizer().setShouldAllowCDATA(inForeignContent);
#if ASSERT_ENABLED
m_destructionProhibited = false;
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231218/03693fa7/attachment.htm>
More information about the webkit-unassigned
mailing list