From 6688e2b2f9dacd92594eb1be2170cbed121a3c63 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 --- koha-tmpl/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 51f4b2af84..6836d20cd5 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 %] @@ -69,7 +70,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.11.0