From 729d37d4421ab99e6eeb4295a7c4c465155b7bc5 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=utf8 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 Signed-off-by: Katrin Fischer --- .../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 a63dccaedb..0e077c30fe 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.39.5