From ff9aca298da54da658fab36b1cc5608fb92dbae1 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Wed, 26 Sep 2007 12:26:32 +0200 Subject: [PATCH] BUGFIX (unimarc specific) escaping ' in template variables in 4XX plugin Signed-off-by: Chris Cormack --- cataloguing/value_builder/unimarc_field_4XX.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl index 75b71040a3..fef3738048 100755 --- a/cataloguing/value_builder/unimarc_field_4XX.pl +++ b/cataloguing/value_builder/unimarc_field_4XX.pl @@ -290,6 +290,21 @@ sub plugin { if ( $marcrecord->field('010') ) { $subfield_value_y = $marcrecord->field('010')->subfield("a"); } + # escape the 's + $subfield_value_9 =~ s/'/\\'/g; + $subfield_value_0 =~ s/'/\\'/g; + $subfield_value_a =~ s/'/\\'/g; + $subfield_value_c =~ s/'/\\'/g; + $subfield_value_d =~ s/'/\\'/g; + $subfield_value_e =~ s/'/\\'/g; + $subfield_value_h =~ s/'/\\'/g; + $subfield_value_i =~ s/'/\\'/g; + $subfield_value_p =~ s/'/\\'/g; + $subfield_value_t =~ s/'/\\'/g; + $subfield_value_u =~ s/'/\\'/g; + $subfield_value_v =~ s/'/\\'/g; + $subfield_value_x =~ s/'/\\'/g; + $subfield_value_y =~ s/'/\\'/g; $template->param( fillinput => 1, index => $query->param('index') . "", -- 2.39.5