From 3dc2e9b049a8bc5885b441ce84e3927b04e00ee8 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 13 Oct 2015 11:31:44 -0400 Subject: [PATCH] Bug 14716 - opac-detail.pl -- Series link fails when series title ends with semicolon preceded by space. This is happening because the query is malformed. Take for example the query se,phr:"Frank%20Einstein%20;" which is se,phr:"Frank Einstein" but the semicolon is truncating the query so it looks to Koha se,phr:"Frank Einstein which is not a problem on the staff side. Zebra seems to deal with this ok. On the opac side though, we are adding on supression, so the query ends up like this: (se,phr:"Frank Einstein ) not Suppress=1 which zebra chokes on. Removing the semicolon from the subject heading would fix this, but I imagine that's a band-aid as the semi is part of the standard. The semi is being treated as an ampersand. This is deep in the machinery ( http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2 ) Basically, the semi needs to be url encoded as %3B Test Plan: 1) Import the records in the attached MARC21 file, re-index 2) From the OPAC search for "Frank Einstein and the antimatter motor" 3) Click the series link, note you get no results 4) Apply this patch 5) Refresh the record details page 6) Click the series link 7) Results! NOTE: This bug does not occurr with all Koha server configurations. I have yet to determine the specific variable that creates this truncation behavior. --- .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- .../bootstrap/en/xslt/MARC21slimUtils.xsl | 43 ++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index a92ef6a..7aba367 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -220,7 +220,7 @@ - /cgi-bin/koha/opac-search.pl?q=se,phr:"" + /cgi-bin/koha/opac-search.pl?q=se,phr:"" diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl index 4f7efed..a00d73e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl @@ -271,6 +271,49 @@ + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +  ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + + !'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ + + 0123456789ABCDEF + + + + + + + + + + + + + + + + + + + Warning: string contains a character that is out of range! Substituting "?". + 63 + + + + + + + + + + + + + + + +