diff --git a/Tests/LibWeb/Text/expected/Element-toggleAttribute-invalid-name.txt b/Tests/LibWeb/Text/expected/Element-toggleAttribute-invalid-name.txt new file mode 100644 index 00000000000..d9d5ee68910 --- /dev/null +++ b/Tests/LibWeb/Text/expected/Element-toggleAttribute-invalid-name.txt @@ -0,0 +1,2 @@ + PASS (''): InvalidCharacterError +PASS ('0'): InvalidCharacterError diff --git a/Tests/LibWeb/Text/input/Element-toggleAttribute-invalid-name.html b/Tests/LibWeb/Text/input/Element-toggleAttribute-invalid-name.html new file mode 100644 index 00000000000..e91cc529863 --- /dev/null +++ b/Tests/LibWeb/Text/input/Element-toggleAttribute-invalid-name.html @@ -0,0 +1,24 @@ + + +
+ diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index fb54a8a4f4f..6d976d24197 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -338,9 +338,8 @@ bool Element::has_attribute_ns(Optional