From 39c22b1a6a744d6b4c50c3a4b62295ab3a601636 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 13 Feb 2015 13:30:56 +0100 Subject: [PATCH] Bug 13700: Fix item search templates for translation Since translator rebuild HTML tags with double quotes for attributes values, use double quotes in english template too and escape them with backslash. Signed-off-by: Bernardo Gonzalez Kriegel It works well!! Test: 1) Intall translation (de-DE, es-ES) 2) to Go to item search, in english, do a search that gives results 3) Switch language, repeat search, result's table does not render 4) Apply patch 5) Install translation again 6) Repeat 3, now results are displayed No koha-qa errors Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../en/includes/catalogue/itemsearch_item.json.inc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 3e5d9a77e6..605a1bf525 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 @@ -2,11 +2,15 @@ [%- biblio = item.biblio -%] [%- biblioitem = item.biblioitem -%] [ - "[% biblio.title |html %] by [% biblio.author |html %]", + "[% FILTER escape_quotes = replace('"', '\"') ~%] + [% biblio.title |html %] by [% biblio.author |html %] + [%~ END %]", "[% biblioitem.publicationyear |html %]", "[% biblioitem.publishercode |html %]", "[% biblioitem.collectiontitle |html %]", - "[% item.barcode |html %]", + "[% FILTER escape_quotes ~%] + [% item.barcode |html %] + [%~ END %]", "[% item.itemcallnumber |html %]", "[% Branches.GetName(item.homebranch) |html %]", "[% Branches.GetName(item.holdingbranch) |html %]", @@ -14,5 +18,7 @@ "[% item.stocknumber |html %]", "[% item.status |html %]", "[% (item.issues || 0) |html %]", - "Edit" + "[% FILTER escape_quotes ~%] + Edit + [%~ END %]" ] -- 2.39.5