From e79420813e402ac91fb31a8abf8156b6f3fcb4fd Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 12 Mar 2015 21:01:52 +1300 Subject: [PATCH] Revert "Bug 13789 - facets with accented utf-8 characters generate double encoded links" This reverts commit 0029619eb3838eb372eca87b8eb3e6ca1a3a4629. --- catalogue/search.pl | 5 +++-- .../intranet-tmpl/prog/en/includes/facets.inc | 14 +++++++------- .../bootstrap/en/includes/opac-facets.inc | 11 +++++++---- opac/opac-search.pl | 3 ++- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index b9c73ae467..24abcb0963 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -519,7 +519,7 @@ for my $this_cgi ( split('&',$limit_cgi) ) { my $input_name = $1; my $input_value = $2; $input_name =~ s/=$//; - push @limit_inputs, { input_name => $input_name, input_value => Encode::decode_utf8( uri_unescape($input_value) ) }; + push @limit_inputs, { input_name => $input_name, input_value => uri_unescape($input_value) }; } $template->param ( LIMIT_INPUTS => \@limit_inputs ); @@ -723,11 +723,12 @@ my $gotopage = $cgi->param('gotoPage'); $template->{'VARS'}->{'gotoPage'} = $gotopage if $gotopage =~ m/^(ISBD|labeledMARC|MARC|more)?detail.pl$/; +my @input_values = map { Encode::decode_utf8($_->{input_value}) } @limit_inputs; for my $facet ( @$facets ) { for my $entry ( @{ $facet->{facets} } ) { my $index = $entry->{type_link_value}; my $value = $entry->{facet_link_value}; - $entry->{active} = grep { $_->{input_value} eq qq{$index:$value} } @limit_inputs; + $entry->{active} = grep { $_ eq qq{$index:$value} } @input_values; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 7d4e56efee..6a6ba0576e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -23,14 +23,17 @@ [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index cd60e8221a..e1b69a5abb 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -32,17 +32,20 @@