From 1b1b3970baccf0b595446bd8c05764b99f2ddfe9 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 17 Oct 2023 13:13:42 +0200 Subject: [PATCH] Bug 33568: JSON-encode html output of build_table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This prevents error with quotes coming from translations Signed-off-by: Owen Leonard Signed-off-by: Laurence Rault Signed-off-by: Emily Lamancusa Signed-off-by: Tomás Cohen Arazi --- .../includes/html_helpers/tables/items/catalogue_detail.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index a63dccaedb0..0e077c30fe0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -1,4 +1,5 @@ [% USE To %] +[% USE tojson = To %] [% USE Koha %] [% USE Branches %] [% USE AuthorisedValues %] @@ -234,8 +235,8 @@ }; let table_nodes = { - holdings: '[% PROCESS 'build_table' tab="holdings" | collapse %]', - otherholdings: '[% PROCESS 'build_table' tab="otherholdings" | collapse %]', + holdings: "[% PROCESS 'build_table' tab="holdings" | collapse | $tojson %]", + otherholdings: "[% PROCESS 'build_table' tab="otherholdings" | collapse | $tojson %]", }; function build_items_table (tab_id, add_filters, dt_options, drawcallback) { -- 2.34.1