mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 07:49:05 +00:00
AK: Add BOM handling to String::from_utf8_with_replacement_character
This commit is contained in:
parent
1e8cc97b73
commit
b3bf5c4ea8
Notes:
github-actions[bot]
2024-08-12 10:39:57 +00:00
Author: https://github.com/shannonbooth
Commit: b3bf5c4ea8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1038
Reviewed-by: https://github.com/trflynn89
4 changed files with 21 additions and 7 deletions
|
@ -116,8 +116,8 @@ ErrorOr<Vector<QueryParam>> url_decode(StringView input)
|
|||
auto space_decoded_value = value.replace("+"sv, " "sv, ReplaceMode::All);
|
||||
|
||||
// 5. Let nameString and valueString be the result of running UTF-8 decode without BOM on the percent-decoding of name and value, respectively.
|
||||
auto name_string = String::from_utf8_with_replacement_character(URL::percent_decode(space_decoded_name));
|
||||
auto value_string = String::from_utf8_with_replacement_character(URL::percent_decode(space_decoded_value));
|
||||
auto name_string = String::from_utf8_with_replacement_character(URL::percent_decode(space_decoded_name), String::WithBOMHandling::No);
|
||||
auto value_string = String::from_utf8_with_replacement_character(URL::percent_decode(space_decoded_value), String::WithBOMHandling::No);
|
||||
|
||||
TRY(output.try_empend(move(name_string), move(value_string)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue