ladybird/Userland/Libraries/LibWeb/URLEncoder.h
Luke 70a575d75f LibWeb: Use correct percent encode set for form submissions
We currently only support application/x-www-form-urlencoded for
form submissions, which uses a special percent encode set when
percent encoding the body/query. However, we were not using this
percent encode set.

With the new URL implementation, we can now specify the percent encode
set to be used, allowing us to use this special percent encode set.

This is one of the fixes needed to make the Google cookie consent work.
2021-06-01 23:26:03 +04:30

22 lines
316 B
C++

/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <AK/Vector.h>
namespace Web {
struct URLQueryParam {
String name;
String value;
};
String urlencode(const Vector<URLQueryParam>&, URL::PercentEncodeSet);
}