mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 10:14:58 +00:00
LibWeb: Use is_ascii_case_insensitive_match() where the spec says to
This commit is contained in:
parent
f0b72b819e
commit
2026ea557e
10 changed files with 59 additions and 44 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue