From f7dd8bf28862fe298e9d252a655e037e15aea766 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 8 May 2014 12:34:24 +0200 Subject: [PATCH] Bug 11944: Fix encoding issue on search history MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Newly introduced by patches from bug 10807, the string was decoded before to be stored in session. To reproduce: Enable history search Go at the OPAC and log out Search for صة Go on your search history The search description should be correctly encoded Signed-off-by: Jonathan Druart --- C4/Search/History.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Search/History.pm b/C4/Search/History.pm index 4330692..9640476 100644 --- a/C4/Search/History.pm +++ b/C4/Search/History.pm @@ -37,8 +37,8 @@ sub add { sub add_to_session { my ($params) = @_; my $cgi = $params->{cgi}; - my $query_desc = Encode::decode_utf8( $params->{query_desc} ) || "unknown"; - my $query_cgi = Encode::decode_utf8( $params->{query_cgi} ) || "unknown"; + my $query_desc = $params->{query_desc} || "unknown"; + my $query_cgi = $params->{query_cgi} || "unknown"; my $total = $params->{total}; my $type = $params->{type} || 'biblio'; @@ -152,7 +152,7 @@ sub set_to_session { my $session = C4::Auth::get_session($sessionID); return () unless $session; $session->param( 'search_history', - uri_escape_utf8( encode_json($search_history) ) ); + uri_escape( encode_json($search_history) ) ); } 1; -- 1.7.10.4