summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/XML
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2023-05-01 15:26:37 +0330
committerAndreas Kling <kling@serenityos.org>2023-05-01 15:22:55 +0200
commit8d446d2a9e7732f7badfa00e98fc130d5faee5dc (patch)
tree80e054613dbd419cd6c0d376f43c29bcd7f3d3d1 /Userland/Libraries/LibWeb/XML
parent75d603c31b632c381ae1c1946d1b91545cc405a1 (diff)
downloadserenity-8d446d2a9e7732f7badfa00e98fc130d5faee5dc.zip
LibWeb: Make XMLDocumentBuilder create elements with the HTML namespace
Otherwise we'll end up with all-generic elements and not run any special HTML sauce logic, leading to very plain pages.
Diffstat (limited to 'Userland/Libraries/LibWeb/XML')
-rw-r--r--Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp
index 4d5d562010..3bdaefa156 100644
--- a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp
+++ b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp
@@ -64,7 +64,7 @@ void XMLDocumentBuilder::element_start(const XML::Name& name, HashMap<XML::Name,
}
}
- auto node = DOM::create_element(m_document, name, {}).release_value_but_fixme_should_propagate_errors();
+ auto node = DOM::create_element(m_document, name, s_html_namespace).release_value_but_fixme_should_propagate_errors();
// When an XML parser with XML scripting support enabled creates a script element,
// it must have its parser document set and its "force async" flag must be unset.
// FIXME: If the parser was created as part of the XML fragment parsing algorithm, then the element must be marked as "already started" also.
@@ -90,7 +90,7 @@ void XMLDocumentBuilder::element_end(const XML::Name& name)
{
if (m_has_error)
return;
- VERIFY(m_current_node->node_name() == name);
+ VERIFY(m_current_node->node_name().equals_ignoring_ascii_case(name));
// When an XML parser with XML scripting support enabled creates a script element, [...]
// When the element's end tag is subsequently parsed,
if (m_scripting_support == XMLScriptingSupport::Enabled && HTML::TagNames::script == name) {