Fixed URLSearchParams spaces (x sign) bug

See also https://gitlab.com/ClearURLs/ClearUrls/-/merge_requests/108
This commit is contained in:
Kevin R
2023-11-11 15:54:08 +01:00
parent 14a0832973
commit 92e43b7f61
2 changed files with 19 additions and 1 deletions

View File

@@ -152,7 +152,7 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false, request = null) {
let finalURL = domain;
if (fields.toString() !== "") finalURL += "?" + fields.toString();
if (fields.toString() !== "") finalURL += "?" + urlSearchParamsToString(fields);
if (fragments.toString() !== "") finalURL += "#" + fragments.toString();
url = finalURL.replace(new RegExp("\\?&"), "?").replace(new RegExp("#&"), "#");