Summary: | Next pages results for cyrillic symbols shows decoded text in URL in anchor tag | ||
---|---|---|---|
Product: | Koha | Reporter: | Bohdan <b.pastern4k> |
Component: | Searching | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gveranis, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: | Search encoding |
Based on https://www.perlmonks.org/bare/?node_id=495747 and that answer " Won't that escape data twice? Without actually running it, it looks like "\x{1234}" would be transformed by uri_escape_utf8 into "%C8%B4" which would be transformed by POST into "%25C8%25B4" while the right answer would be "%C8%B4" " I add the line $query_cgi = Encode::decode_utf8(uri_unescape($query_cgi)); at 587 of opac-search.pl and it works I will try later to do a patch for that. Thank you very much for this! Resetting assignee to default This appears to have been fixed. I tested a search for "Л" in the OPAC and switched pages, the breadcrumbs and URL still look nice. |
Created attachment 84849 [details] Search encoding This bug is reproduced on OPAC, intranet works fine. Whenether i enter cyrillic symbols in search, first page results are fine, but the generated HTML page has wrong value in pagination. Something like this is inside each li>a href element in pagination /cgi-bin/koha/opac-search.pl?idx=kw&q=%25D1%2588%25D0%25B5%25D0%25B2%25D1%2587%25D0%25B5%25D0%25BD%25D0%25BA%25D0%25BE&offset=20&sort_by=relevance_dsc If i click search on this link i am redirected to page that shows broken characters as you can see in attachment.