diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2023-05-01 15:26:37 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-01 15:22:55 +0200 |
commit | 8d446d2a9e7732f7badfa00e98fc130d5faee5dc (patch) | |
tree | 80e054613dbd419cd6c0d376f43c29bcd7f3d3d1 | |
parent | 75d603c31b632c381ae1c1946d1b91545cc405a1 (diff) | |
download | serenity-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.
-rw-r--r-- | Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.cpp | 4 |
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) { |