From 1180efe11e93d1e3004ec29e0962ac83ed54e461 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 4 Sep 2015 08:57:08 +0200 Subject: [PATCH] Bug 14766: unimarc_field_4XX: escape ', ", \n, \r Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit abd71d017ea68f4209e41b34282e8fce8170e175) Signed-off-by: Chris Cormack (cherry picked from commit c7dfbfedd3d298753b4d96d5ce50363c2cfc65fc) Signed-off-by: Liz Rea --- .../modules/cataloguing/value_builder/unimarc_field_4XX.tt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt index d6bdd64686..04400614bf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tt @@ -49,13 +49,13 @@ subfield.value = "[% subfield_value_i %]"; } if(code.value == 'l'){ - subfield.value = "[% subfield_value_l %]"; + subfield.value = "[% subfield_value_l |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; } if(code.value == 'n'){ - subfield.value = "[% subfield_value_n %]"; + subfield.value = "[% subfield_value_n |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; } if(code.value == 'o'){ - subfield.value = "[% subfield_value_o %]"; + subfield.value = "[% subfield_value_o |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; } if(code.value == 'p'){ subfield.value = "[% subfield_value_p %]"; -- 2.39.5