Bug 23132: Fix encoding issues in facets with show more link
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 17 Jun 2019 14:28:22 +0000 (16:28 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 20 Jun 2019 08:33:19 +0000 (09:33 +0100)
When one uses characters like Ã, ç ... the first searcshow up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.

Test plan :

Without the patch:
- check if you have your SysPref SearchEngine with Elasticsearch as value,
- put your SysPref FacetMaxCount at 10,
- search in the catalog "a" and then in Refine your search click on show more (just to see how it works),
- then search with special characters like "é", ç" ... and make the same test, the research should be wrong when you click on show more and the page is realoaded.

Then apply the patch:
- and make the same with a classic reasearch, then with special characters,
- verify that when you click on show more the page isn't realoded and the reasearch is correct.
- same with show less
- and finnaly, add some facets and test show more/less

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc

index ea7a46d..e67919c 100644 (file)
@@ -49,7 +49,7 @@
   [% END %]
   [% IF ( facets_loo.expandable ) %]
       <li class="showmore">
-          <a href="[% url | url %][% IF offset %]&amp;offset=[% offset | uri %][% END %]&amp;expand=[% facets_loo.expand | uri %]#[% facets_loo.type_id | uri %]">Show more</a>
+          <a href="[% url | $raw %][% IF offset %]&amp;offset=[% offset | uri %][% END %]&amp;expand=[% facets_loo.expand | uri %]#[% facets_loo.type_id | uri %]">Show more</a>
       </li>
   [% END %]
 </ul></li>