Bug 10070: fix saving searches with non-ASCII characters to anonymous search history
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 26 Apr 2013 13:43:58 +0000 (15:43 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 25 Jul 2013 15:53:41 +0000 (15:53 +0000)
To test
1/ logout
2/ search "bar" (added to the history)
3/ search "féé" => history is empty

Apply patch
1/ logout
2/ search "bar" (added to the history)
3/ search "féé" => added to the history

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
opac/opac-search.pl

index 880317a..6349e3c 100755 (executable)
@@ -654,7 +654,7 @@ for (my $i=0;$i<@servers;$i++) {
                 $newsearchcookie = $cgi->cookie(
                             -name => 'KohaOpacRecentSearches',
                             # We uri_escape the whole freezed structure so we're sure we won't have any encoding problems
-                            -value =>freeze(\@recentSearches),
+                            -value => uri_escape( freeze(\@recentSearches) ),
                             -expires => ''
                 );
                 $cookie = [$cookie, $newsearchcookie];