mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
LibWeb: Don't crash on Document.createElement() with emoji in tag name
Once again, we were mistakenly using StringBuilder's append(char) when we really wanted append_code_point(u32).
This commit is contained in:
parent
1b81e0081d
commit
0d74ced9b5
3 changed files with 9 additions and 1 deletions
|
@ -113,7 +113,7 @@ ErrorOr<String> to_ascii_uppercase(StringView string)
|
|||
auto utf8_view = Utf8View { string };
|
||||
for (u32 code_point : utf8_view) {
|
||||
code_point = AK::to_ascii_uppercase(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