mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
AK: Port percent_encode_after_encoding to String
This commit is contained in:
parent
cb4c279e90
commit
50d8ef94ba
3 changed files with 7 additions and 7 deletions
|
@ -53,11 +53,11 @@ ErrorOr<String> url_encode(Vector<QueryParam> const& tuples, StringView encoding
|
|||
|
||||
// 2. Let name be the result of running percent-encode after encoding with encoding, tuple’s name, the application/x-www-form-urlencoded percent-encode set, and true.
|
||||
// FIXME: URLParser does not currently implement encoding.
|
||||
auto name = AK::URLParser::percent_encode_after_encoding(tuple.name, AK::URL::PercentEncodeSet::ApplicationXWWWFormUrlencoded, true);
|
||||
auto name = TRY(URLParser::percent_encode_after_encoding(tuple.name, AK::URL::PercentEncodeSet::ApplicationXWWWFormUrlencoded, true));
|
||||
|
||||
// 3. Let value be the result of running percent-encode after encoding with encoding, tuple’s value, the application/x-www-form-urlencoded percent-encode set, and true.
|
||||
// FIXME: URLParser does not currently implement encoding.
|
||||
auto value = AK::URLParser::percent_encode_after_encoding(tuple.value, AK::URL::PercentEncodeSet::ApplicationXWWWFormUrlencoded, true);
|
||||
auto value = TRY(URLParser::percent_encode_after_encoding(tuple.value, AK::URL::PercentEncodeSet::ApplicationXWWWFormUrlencoded, true));
|
||||
|
||||
// 4. If output is not the empty string, then append U+0026 (&) to output.
|
||||
if (!output.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue