mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Don't crash on Element.setAttribute() with emoji in name
We were mistakenly using StringBuilder's append(char) when we really wanted append_code_point(u32).
This commit is contained in:
parent
dbca63a1db
commit
1b81e0081d
3 changed files with 10 additions and 1 deletions
|
@ -99,7 +99,7 @@ ErrorOr<String> 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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue