From 9ce139a3f084c33bb3d1f591831ca8b26c0918a9 Mon Sep 17 00:00:00 2001 From: Vincent Sgherzi Date: Mon, 7 Oct 2024 01:36:42 -0700 Subject: [PATCH] LibWeb: Fix boolean logic mistake in XMLSerializer for empty public ID Fixes 5 subtests on http://wpt.live/domparsing/xml-serialization.xhtml --- Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp index ea12a6dd8cc..01a1e095b27 100644 --- a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp +++ b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp @@ -839,7 +839,7 @@ static WebIDL::ExceptionOr serialize_document_type(DOM::DocumentType con } // 8. If the node's systemId is not the empty string and the node's publicId is set to the empty string, then append the following, in the order listed, to markup: - if (!document_type.system_id().is_empty() && !document_type.public_id().is_empty()) { + if (!document_type.system_id().is_empty() && document_type.public_id().is_empty()) { // 1. " " (U+0020 SPACE); // 2. The string "SYSTEM". markup.append(" SYSTEM"sv);