From 7f04ac955d2c202ad7ce2ecf29ae9e6577db9f4f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 28 Aug 2015 11:59:26 +0100 Subject: [PATCH] Bug 12478: Fix encoding issue on facets MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Filer on "Ślez, Ts." => Can't escape \x{015A}, try uri_escape_utf8() instead at /home/koha/src/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 221. Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Brendan Gallagher --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index 67e5ac547a..e6fe0db02e 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -216,12 +216,12 @@ sub build_query_compat { #die Dumper($query); # We roughly emulate the CGI parameters of the zebra query builder - my $query_cgi = 'idx=kw&q=' . uri_escape( $operands->[0] ) if @$operands; + my $query_cgi = 'idx=kw&q=' . uri_escape_utf8( $operands->[0] ) if @$operands; my $simple_query = $operands->[0] if @$operands == 1; my $query_desc = $simple_query; my $limit = $self->_join_queries( $self->_convert_index_strings(@$limits)); my $limit_cgi = - '&limit=' . join( '&limit=', map { uri_escape($_) } @$orig_limits ); + '&limit=' . join( '&limit=', map { uri_escape_utf8($_) } @$orig_limits ); my $limit_desc = "$limit" if $limit; return ( undef, $query, $simple_query, $query_cgi, $query_desc, -- 2.39.5