Bug 11515 - Encoding problem with OpacBrowseResults
authorFridolin SOMERS <fridolin.somers@biblibre.com>
Fri, 10 Jan 2014 10:52:22 +0000 (11:52 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 21 Nov 2014 18:54:05 +0000 (15:54 -0300)
commit260c423be8e59cfbaabeead33634a8a435ac05bc
treeab0f6fa309163e23532909d58bdbbced2ab77361
parent499dbca6b8f83cb9e1a6bdc28ee13324a21e417d
Bug 11515 - Encoding problem with OpacBrowseResults

When OpacBrowseResults syspref is on, the detail page contains a results browser.
When search terms contains non-ASCII character, the search query is not well encoded in this browser.

This patch adds the URI-coding to search terms into session to avoid any encoding problem with diacritics and URI specific characters like ?,& ...
So that TT parameter 'busc' is already URI encoded and can be used to recreate seach URL.

Test plan :
- Set OpacBrowseResults on
- At OPAC, perform a search with a diacritique. For example 'déjà'
- Go to detail page of a result
=> You see browser under "Browser results"
- Click on "Back to results"
=> You get same results and same search term with correct encoding

Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug still present on master. I note that latin characters are taken by ISO-8859-1 encoding
(Perl's default) and that's why real UTF8 ones don't break (Perl notices they are UTF-8).
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
opac/opac-detail.pl
opac/opac-search.pl