diff --git a/core/polyfills.php b/core/polyfills.php index 26dc4aac..2c0ca5bb 100644 --- a/core/polyfills.php +++ b/core/polyfills.php @@ -473,6 +473,8 @@ function url_escape(?string $input): string $input = str_replace('^', '^^', $input); $input = str_replace('/', '^s', $input); $input = str_replace('\\', '^b', $input); + $input = str_replace('?', '^q', $input); + $input = str_replace('&', '^a', $input); $input = rawurlencode($input); return $input; } diff --git a/core/util.php b/core/util.php index 70f13364..26e00fae 100644 --- a/core/util.php +++ b/core/util.php @@ -628,6 +628,12 @@ function _decaret(string $str): string if ($str[$i] == "b") { $out .= "\\"; } + if ($str[$i] == "q") { + $out .= "?"; + } + if ($str[$i] == "a") { + $out .= "&"; + } } else { $out .= $str[$i]; }