Bug 17074: Follow-up: fixing encoding issues with multiple search terms

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 <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 09d7a47f1f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a42da0108e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Katrin Fischer 2016-08-08 01:15:23 +02:00 committed by Julian Maurice
parent df7f0df740
commit ad04bca35e
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -398,7 +398,7 @@ var holdForPatron = function () {
<tr>
<td>
[% IF ( scan_search_term_to_use ) %]
Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="[% scan_search_term_to_use %]" />
Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="[% scan_search_term_to_use | html %]" />
[% ELSE %]
Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
[% END %]