From 8051b885d20e98c0dc57c7d893157a06581adfb0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 11 Nov 2019 19:03:41 +0100 Subject: [PATCH] Bug 23777: Fix auth finder escaping Signed-off-by: Hayley Mapley Signed-off-by: Martin Renvoize --- .../prog/en/modules/authorities/blinddetail-biblio-search.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt index 6822225ea9..8d2749170d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt @@ -1,3 +1,4 @@ +[% USE To %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Authority details @@ -108,9 +109,9 @@ [% UNLESS ( clear ) %] [% FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP %] SetSubfieldValues( - "[% tag_number |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %][% SUBFIELD_LOO.marc_subfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]" + "[% To.json(tag_number) | $raw %][% To.json(SUBFIELD_LOO.marc_subfield) | $raw %]" [% FOREACH marc_value IN SUBFIELD_LOO.marc_values %] - ,"[% marc_value |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]" + ,"[% To.json( marc_value ) | $raw %]" [% END %] ); [% END %] -- 2.39.5