From ee6b0e144a8eefa16a39f38375a8870a2826e9a1 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sun, 18 Feb 2024 14:27:25 +0000 Subject: [PATCH] LibWeb: Make the default XML namespace an empty Optional Previously, when constructing an XML document, the default namespace was the empty string. This led to XML documents having empty xmlns attributes when serialized. --- Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.h b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.h index 033f15c0eaa..f176a359bc2 100644 --- a/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.h +++ b/Userland/Libraries/LibWeb/XML/XMLDocumentBuilder.h @@ -42,10 +42,10 @@ private: XMLScriptingSupport m_scripting_support { XMLScriptingSupport::Enabled }; bool m_has_error { false }; StringBuilder text_builder; - FlyString m_namespace; + Optional m_namespace; struct NamespaceStackEntry { - FlyString ns; + Optional ns; size_t depth; }; Vector m_namespace_stack;