Bug 27748: Encoding problem in link to OverDrive results
authorMagnus Enger <magnus@libriotech.no>
Tue, 23 Feb 2021 09:39:33 +0000 (10:39 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 15 Apr 2021 11:04:22 +0000 (13:04 +0200)
commitb7de6e267a17b9390ee012f874c8ed3c535cd480
treef2580bbb6ca8885c679ac7b6a9b6f4a808e1a49f
parent03e3f03c97b27a098339e96cd8b2127f9778ab72
Bug 27748: Encoding problem in link to OverDrive results

If you have OverDrive enabled and do a search for e.g. "Göteborg",
you will get a link above the regular Koha search results that
says e.g. "Found 1 results in the library's OverDrive collection".
If you follow this link, a search will be made in OverDrive, but only
for "G", because the search term is cut off at the first non-ASCII
char.

To test:
- Make sure OverDrive is enabled
- Do a search that contains a non-ASCII char, like "Göteborg"
- Click on the link "Found x results in the library's OverDrive
  collection"
- Verify the query string is cut off at the first non-ASCII char,
  and that the number of hits is different from the number given
  in the link on the previous page
- Apply the patch, restart all the things
- Repeat the search, and verify that the numbers match and that the
  query string is intact after clicking on the OverDrive link

Lookin at the code, the same problem seems to be shared between
OverDrive and RecordedBooks. I have applied the same fix to both,
but I do not have access to RecordedBooks, so I have not been able
to verify that the problem exists there and is fixed by my patch.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b9a3ac31919794e3d892ba3735a7051c411fccb1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt