Koha/koha-tmpl/intranet-tmpl/prog/en
Dobrica Pavlinusic 1ca9adaa56 Bug 13789 - facets with accented utf-8 characters generate double encoded links
Bug 13425 tried to fix XSS in OPAC, by using url filter in template toolkit
on whole generated url. This doesn't work and create double encoded strings
in facets because we are creating url variable by concatenating query_cgi
(which did pass through uri_escape_utf8 on perl side) and other
parameters which have to be escaped in template.

Also, code like

[% SET limit_cgi_f = limit_cgi | url %]

doesn't do anything (at least doesn't apply url filter) so it's not needed.

This patch also fixes encoding of hidden fields used in sort by form.

And lastly, it tries to make facet changes for opac and intranet as same as
possible to simplify future maintencence of this code.

Test scenario:
1. find results in your opac which contain accented characters
2. click on them and verify that results are missing
3. apply this patch
4. re-run search and click on facets link verifying that there are
   now results
5. test sort by form and verify that results are ok
6. verify that facets are still safe from injection by constructing url like
   /cgi-bin/koha/opac-search.pl?q=123&sort_by='"><script>prompt('Happy_Holidays')</script>&limit=123
   and verifying that you DON'T see prompt window in your browser

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-03-07 21:05:04 +01:00
..
css Bug 13040 [CSS follow-up] Improve exporter to allow multiple branch selections 2015-01-26 16:27:05 -03:00
data Bug 11695 - Fixed typo in marc21_field_008.xml 2014-03-11 14:21:23 +00:00
includes Bug 13789 - facets with accented utf-8 characters generate double encoded links 2015-03-07 21:05:04 +01:00
js Bug 13605 - _AUTHOR_ not replaced in relatives checkouts 2015-03-05 14:52:59 +01:00
lib/yui Bug 13139 - Move treeview jQuery plugin outside of language-specific directory 2014-10-27 12:36:53 -03:00
modules Bug 11395: A control field is a field with tag < 10 2015-03-05 15:27:26 +01:00
xslt Bug 12842: Add DDC classification numbers to MARC21 XSLT detail page 2015-02-09 14:04:42 -03:00
columns.def Bug 13142 - Change "mobile phone" label back to "other phone" 2015-02-13 13:52:10 -03:00