mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +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
Notes:
sideshowbarker
2024-07-17 09:49:33 +09:00
Author: https://github.com/awesomekling
Commit: 0d74ced9b5
Pull-request: https://github.com/SerenityOS/serenity/pull/22151
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