From a42da0108e3f8dee889ef28e0c0d736e23a9aacc Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 8 Aug 2016 01:15:23 +0200 Subject: [PATCH] Bug 17074: Follow-up: fixing encoding issues with multiple search terms MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If there was more than one search term you could see that that it was url encoded. Also problems with search terms with umlauts and other diacritics. Patch should fix that. https://bugs.koha-community.org/show_bug.cgi?id=17074 Signed-off-by: Marc Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 09d7a47f1fb1c645d0e3ffb93fb88409b3310363) Signed-off-by: Frédéric Demians --- catalogue/search.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index 41f67aad08..77c982d0f2 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -504,7 +504,7 @@ for my $this_cgi ( split('&',$query_cgi) ) { $scan_index_to_use = $input_value; # unless $scan_index_to_use; } if ($input_name eq 'q') { - $scan_search_term_to_use = $input_value; + $scan_search_term_to_use = Encode::decode_utf8( uri_unescape( $input_value )); } } $template->param ( QUERY_INPUTS => \@query_inputs, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index f04876e840..3cecf8ac4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -422,7 +422,7 @@ var holdForPatron = function () { [% IF ( scan_search_term_to_use ) %] - Scan Index for: + Scan Index for: [% ELSE %] Scan Index for: [% END %] -- 2.39.5