From ad04bca35e8b228c98baef07363333d097cd75d4 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 (cherry picked from commit a42da0108e3f8dee889ef28e0c0d736e23a9aacc) Signed-off-by: Julian Maurice --- 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 06e11693c3..7ba9cf45c5 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -501,7 +501,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 68038cbfbc..af92b49bcd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -398,7 +398,7 @@ var holdForPatron = function () { [% IF ( scan_search_term_to_use ) %] - Scan Index for: + Scan Index for: [% ELSE %] Scan Index for: [% END %] -- 2.39.5