diff --git a/Tests/LibWeb/Text/expected/DOM/setAttribute-with-emoji-in-attribute-name.txt b/Tests/LibWeb/Text/expected/DOM/setAttribute-with-emoji-in-attribute-name.txt new file mode 100644 index 00000000000..35c957db0f3 --- /dev/null +++ b/Tests/LibWeb/Text/expected/DOM/setAttribute-with-emoji-in-attribute-name.txt @@ -0,0 +1 @@ +PASS (Didn't crash) diff --git a/Tests/LibWeb/Text/input/DOM/setAttribute-with-emoji-in-attribute-name.html b/Tests/LibWeb/Text/input/DOM/setAttribute-with-emoji-in-attribute-name.html new file mode 100644 index 00000000000..f9b39779417 --- /dev/null +++ b/Tests/LibWeb/Text/input/DOM/setAttribute-with-emoji-in-attribute-name.html @@ -0,0 +1,8 @@ + + diff --git a/Userland/Libraries/LibWeb/Infra/Strings.cpp b/Userland/Libraries/LibWeb/Infra/Strings.cpp index c37d70d4cb0..c4321850b82 100644 --- a/Userland/Libraries/LibWeb/Infra/Strings.cpp +++ b/Userland/Libraries/LibWeb/Infra/Strings.cpp @@ -99,7 +99,7 @@ ErrorOr to_ascii_lowercase(StringView string) auto utf8_view = Utf8View { string }; for (u32 code_point : utf8_view) { code_point = AK::to_ascii_lowercase(code_point); - TRY(string_builder.try_append(code_point)); + string_builder.append_code_point(code_point); } return string_builder.to_string(); }