From 8b0fd4daafb451f9f120ced613d67b9b28189e20 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 30 Mar 2021 10:30:57 +0200 Subject: [PATCH] FilterEditor: Merge preserved query params as encoded params This way the query param values are not encoded twice. fixes #4321 --- library/Icinga/Web/Widget/FilterEditor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php index 89e1a0bbd..f1efd9a8e 100644 --- a/library/Icinga/Web/Widget/FilterEditor.php +++ b/library/Icinga/Web/Widget/FilterEditor.php @@ -288,7 +288,10 @@ class FilterEditor extends AbstractWidget $url = Url::fromRequest()->onlyWith($this->preserveParams); $urlParams = $url->getParams(); $url->setQueryString($filter->toQueryString()); - $url->getParams()->mergeValues($urlParams->toArray(false)); + foreach ($urlParams->toArray(false) as $key => $value) { + $url->getParams()->addEncoded($key, $value); + } + $this->redirectNow($url); }