From 4230e05feadc887454badbc737006ee8b2ed829f Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Tue, 4 Jul 2017 14:22:58 +1200 Subject: [PATCH] Bug 16804 - unescaped semicolons in XSLT values can cause searches to fail This patch adds a url-encode to the MARC21slimUtils, and applies it specifically to a common place where semicolons can appear in searches, the 490 field. To test: * have OPACSuppression on * have a record with a 490 field a la: 490 _a something ; _v 123 * go to the opac and search for this record * click the Series link from the detail Without this patch, there will be no results. With this patch, you will get relevant results (possibly the same record back) There are probably lots of places this could be applied, and also possibly many other solutions. --- .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 4 +- .../bootstrap/en/xslt/MARC21slimUtils.xsl | 56 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index f31b1be..e480dc0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -221,7 +221,7 @@ - /cgi-bin/koha/opac-search.pl?q=se,phr:"" + /cgi-bin/koha/opac-search.pl?q=se,phr:"" @@ -249,7 +249,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 596bddf..3d520e0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl @@ -1,6 +1,22 @@ ]> + + + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + + + + ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + + + !'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ + + + 0123456789ABCDEF + @@ -295,6 +311,46 @@ + + + + + + + + + + + + + + + + + + + + + Warning: string contains a character that is out of range! Substituting "?". + 63 + + + + + + + + + + + + + + + + + +