From 73d2f954445c032a8f69b0c5885f33e44ca157e5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 12 Nov 2019 09:11:30 +0100 Subject: [PATCH] Bug 23777: Use To.json in authorities.tt No fix here. Test plan: Edit GENRE/FORM 040$a With text: Original catalo'"ging age"'ncy Save, you get the alert Signed-off-by: Hayley Mapley Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/authorities/authorities.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt index bf2dffc6ca..55ddb49f4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -1,4 +1,5 @@ [% USE raw %] +[% USE To %] [% USE Asset %] [% INCLUDE 'doc-head-open.inc' %] Koha › Authorities › [% IF ( authid ) %]Modify authority #[% authid | html %] ([% authtypetext | html %])[% ELSE %]Adding authority ([% authtypetext | html %])[% END %] @@ -71,7 +72,7 @@ function AreMandatoriesNotOk(){ [% FOREACH subfield_loo IN innerloo.subfield_loop %] [% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id | html %]"); tab.push("[% BIG_LOO.number | html %]"); - label.push("[% subfield_loo.marc_lib | $raw |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"); + label.push("[% To.json(subfield_loo.marc_lib) | $raw %]"); [% END %] [% END %] [% END %] -- 2.39.5