Bug 33568: JSON-encode html output of build_table

This prevents error with quotes coming from translations

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Julian Maurice 2023-10-17 13:13:42 +02:00 committed by Katrin Fischer
parent afc55cb68c
commit 729d37d442
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -1,4 +1,5 @@
[% USE To %] [% USE To %]
[% USE tojson = To %]
[% USE Koha %] [% USE Koha %]
[% USE Branches %] [% USE Branches %]
[% USE AuthorisedValues %] [% USE AuthorisedValues %]
@ -234,8 +235,8 @@
}; };
let table_nodes = { let table_nodes = {
holdings: '[% PROCESS 'build_table' tab="holdings" | collapse %]', holdings: "[% PROCESS 'build_table' tab="holdings" | collapse | $tojson %]",
otherholdings: '[% PROCESS 'build_table' tab="otherholdings" | collapse %]', otherholdings: "[% PROCESS 'build_table' tab="otherholdings" | collapse | $tojson %]",
}; };
function build_items_table (tab_id, add_filters, dt_options, drawcallback) { function build_items_table (tab_id, add_filters, dt_options, drawcallback) {