@@ -, +, @@ --- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1,4 +1,5 @@ [% USE raw %] +[% USE To %] [% USE Asset %] [% USE Koha %] [% USE KohaDates %] @@ -939,10 +940,10 @@ var biblionumber = "[% biblionumber | $raw %]"; var borrowernumber = "[% patron.borrowernumber | $raw %]"; var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); - var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; + var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] [% itemloo.itemnumber | html %]: { - homebranch: "[% Branches.GetName( itemloo.homebranch ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]", + homebranch: "[% To.json( Branches.GetName( itemloo.homebranch ) ) | $raw %]"; holdallowed: [% itemloo.holdallowed | html %] }, [% END %][% END %][% END %] --