From 230a97ccdde71713c1bae407907112edc049720f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 13 Oct 2019 08:39:55 -0400 Subject: [PATCH] Correctly URL encode return URLS for saved search --- src/Content/Text/HTML.php | 2 +- src/Module/Search/Index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index ea9a4737c..549025dec 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -912,7 +912,7 @@ class HTML '$save_label' => $save_label, '$search_hint' => L10n::t('@name, !forum, #tags, content'), '$mode' => $mode, - '$return_url' => urlencode('search?q=' . $s), + '$return_url' => urlencode('search?q=' . urlencode($s)), ]; if (!$aside) { diff --git a/src/Module/Search/Index.php b/src/Module/Search/Index.php index 9c0d9e1df..73de090a7 100644 --- a/src/Module/Search/Index.php +++ b/src/Module/Search/Index.php @@ -63,7 +63,7 @@ class Index extends BaseSearchModule } if (local_user()) { - self::getApp()->page['aside'] .= Widget\SavedSearches::getHTML('search?q=' . $search, $search); + self::getApp()->page['aside'] .= Widget\SavedSearches::getHTML('search?q=' . urlencode($search), $search); } Nav::setSelected('search');