diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-17 15:21:32 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-19 00:46:47 +0100 |
commit | 2026ea557e9aa0d61cb683e94eaed20b63268263 (patch) | |
tree | 1bd12be42d983920ca34f2a1335b81e6c8fe76a6 /Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp | |
parent | f0b72b819e83ed970e1db5ee887ab1eefcb34029 (diff) | |
download | serenity-2026ea557e9aa0d61cb683e94eaed20b63268263.zip |
LibWeb: Use is_ascii_case_insensitive_match() where the spec says to
Diffstat (limited to 'Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp index c4a8513d47..14aedd50f3 100644 --- a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp +++ b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp @@ -15,6 +15,7 @@ #include <LibWeb/DOM/Text.h> #include <LibWeb/DOMParsing/XMLSerializer.h> #include <LibWeb/HTML/HTMLTemplateElement.h> +#include <LibWeb/Infra/Strings.h> #include <LibWeb/Namespace.h> #include <LibWeb/WebIDL/ExceptionOr.h> @@ -859,7 +860,7 @@ static WebIDL::ExceptionOr<DeprecatedString> serialize_processing_instruction(DO if (processing_instruction.target().contains(':')) return WebIDL::InvalidStateError::create(processing_instruction.realm(), "Processing instruction target contains a colon"); - if (processing_instruction.target().equals_ignoring_case("xml"sv)) + if (Infra::is_ascii_case_insensitive_match(processing_instruction.target(), "xml"sv)) return WebIDL::InvalidStateError::create(processing_instruction.realm(), "Processing instruction target is equal to 'xml'"); // 2. If the require well-formed flag is set (its value is true), and node's data contains characters that are not matched by the XML Char production or contains |