From 7800f1817201af83f645c2a09c3a65274d5e78d3 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@biblibre.com>
Date: Wed, 17 Apr 2013 15:37:57 +0200
Subject: [PATCH] [PASSED QA] Bug 10070: Anonymous search history is not being
 set in the cookie

Test plan:
1 - turn on EnableOpacSearchHistory
2 - launch some searches at the opac
3 - go to your search history
4 - there is no history!
5 - apply this patch
6 - retry steps 1 to 3
7 - your history search is available!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

This does fix the bug, but does undo the change to make the cookie
utf-8 safe, however I think that change was done in the wrong way so
I am happy to sign this off

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Wondering if the comment line should be deleted now too.
Patch fixes the problem.
---
 opac/opac-search.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 677b7c2..2502768 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -652,7 +652,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 => uri_escape_utf8(freeze(\@recentSearches)),
+                            -value =>freeze(\@recentSearches),
                             -expires => ''
                 );
                 $cookie = [$cookie, $newsearchcookie];
-- 
1.7.9.5