Bug 21716: Escape publisher in item search
authorLiz Rea <wizzyrea@gmail.com>
Thu, 25 Apr 2019 15:34:36 +0000 (15:34 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 26 Jul 2019 15:14:31 +0000 (16:14 +0100)
To prevent endless processing errors.

To test:

* create a biblio with a publisher with a backslash - i.e. 260$b with
graham\lineham
* do an item search that will include that title in the results
* wait forever, because it won't work.
* apply this patch
* repeat steps, notice that you
    a. get results
    b. your result is listed with it's correct publisher
* rejoice

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc

index ed39685..16db6ad 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE Branches -%]
 [%- USE Koha -%]
+[%- USE To -%]
 [%- USE ItemTypes -%]
 [% USE AuthorisedValues %]
 [%- biblio = item.biblio -%]
@@ -9,7 +10,7 @@
     <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]" title="Go to record detail page">[% biblio.title | html %]</a>[% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %] by[% END %] [% biblio.author | html %]
   [%~ END %]",
   "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]",
-  "[% biblioitem.publishercode | html %]",
+  "[% biblioitem.publishercode | html | $To %]",
   "[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) | html %]",
   "[% FILTER escape_quotes ~%]
     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]#item[% item.itemnumber | uri %]" title="Go to item details">[% item.barcode | html %]</a>