mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb: Don't crash on FormData.append() with emoji in name
If you can believe it, we were once again using StringBuilder's append() when we really wanted append_code_point().
This commit is contained in:
@@ -85,7 +85,7 @@ ErrorOr<String> convert_to_scalar_value_string(StringView string)
|
||||
for (u32 code_point : utf8_view) {
|
||||
if (is_unicode_surrogate(code_point))
|
||||
code_point = 0xFFFD;
|
||||
TRY(scalar_value_builder.try_append(code_point));
|
||||
scalar_value_builder.append_code_point(code_point);
|
||||
}
|
||||
return scalar_value_builder.to_string();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user