From 07f49aa3d3483e2a20d23b5f533ae21569682997 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Thu, 25 Apr 2019 15:34:36 +0000 Subject: [PATCH] Bug 21716: Escape publisher in item search 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 Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize (cherry picked from commit fbeb22802f41f8daf99498303146d1916c851507) Signed-off-by: Fridolin Somers (cherry picked from commit ee9032d625d118f4ccdae881a49f393d8217ef86) Signed-off-by: Lucas Gass --- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc index 45b43f647b..fa02334348 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc @@ -1,5 +1,7 @@ [%- USE Branches -%] [%- USE Koha -%] +[%- USE To -%] +[%- USE ItemTypes -%] [% USE AuthorisedValues %] [%- biblio = item.biblio -%] [%- biblioitem = item.biblioitem -%] @@ -8,7 +10,7 @@ [% biblio.title | html %][% 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 ~%] [% item.barcode | html %] -- 2.39.5