Unescaped ampersands are being sent to the template in the query_cgi variable.
Created attachment 3095 [details] [review] Proposed fix
This bug is mentioned in: Fix for Bug 5714, Unescaped ampersands in OPAC facets http://lists.koha-community.org/pipermail/koha-patches/2011-February/013785.html
I am not sure how to test this. I experimented with a subject heading "A & B" but saw no problems in display or search. Can you explain how to reproduce the problem?
I think think this is probably caused by using rebuild_zebra.pl -b -x, but I was unable to apply this patch to test. Merge conflicts in koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc and koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc
Created attachment 4275 [details] [review] Revised fix Revised for T:T. In the OPAC the "query_cgi" variable passed to the template outputs a string like this: idx=kw&q=thing The ampersand is unescaped. Adding an "|html" filter to the variable. Also correcting some TT markup which added a new validation error (an unopened <div>).
Created attachment 4289 [details] [review] Signed-off patch Did a search in the OPAC and viewed the source of the page. Before applying the patch a typical URL fragment for one of the facets looked like this: /cgi-bin/koha/opac-search.pl?idx=kw&q=lessig&offset=&expand=su-to#su-to_id After applying the patch they all look like e.g. /cgi-bin/koha/opac-search.pl?idx=kw&q=lessig&offset=&expand=su-to#su-to_id Notice the change from idx=kw&q to kw&q. Signing off!
Template change, and good test report by Magnus. marking as Passed QA
Pushed to master, please test
This patch adds the query_cgi directly to the template, without styling, right above the first facet. I believe this was in there for debugging purposes, and needs to be removed or styled in such as way that it can be suppressed (we've got some libraries reporting that it's unattractive).
Created attachment 4443 [details] [review] Follow-up fix
Whoops I fixed this without noticing Owen already had