From 897ed665af43d184679ce8abf232175920a7d29b 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 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 something with utf-8 Go on your search history The search description should be correctly encoded Signed-off-by: Jonathan Druart Signed-off-by: Dobrica Pavlinusic --- C4/Search/History.pm | 6 +++--- 1 files 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.2.5