From 608a8aa805427702784b970f94ca6b8209cb2638 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Feb 2016 15:41:14 +0000 Subject: [PATCH] Bug 15771: Do not use CGI::escapeHTML anymore In admin/auth_subfields_structure.pl, admin/marc_subfields_structure.pl and catalogue/image.pl, the pl script escapes html characters. Since bug 13618 has been pushed, this method should not be used anymore. Test plan: 1/ Edit a framework (biblio and authority) 2/ In the "text for librarian" input, fill "test'apostrophe" 3/ Save 4/ Edit subfields => Without this patch, the ' is displayed escaped => With this patch, everything is fine --- admin/auth_subfields_structure.pl | 8 ++++---- admin/marc_subfields_structure.pl | 12 ++++++------ catalogue/image.pl | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index f06ee4f..a3a0964 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -144,9 +144,9 @@ if ($op eq 'add_form') { }; $row_data{tagsubfieldinput} = "{'tagsubfield'}."\" id=\"tagsubfield\" />"; $row_data{tagsubfield} = $data->{'tagsubfield'}; - $row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'}); - $row_data{libopac} = CGI::escapeHTML($data->{'libopac'}); - $row_data{seealso} = CGI::escapeHTML($data->{'seealso'}); + $row_data{liblibrarian} = $data->{'liblibrarian'}; + $row_data{libopac} = $data->{'libopac'}; + $row_data{seealso} = $data->{'seealso'}; $row_data{kohafield} = { id => "kohafield$i", values => \@kohafields, @@ -178,7 +178,7 @@ if ($op eq 'add_form') { -value => 1, -label => '', -id => "mandatory$i"); - $row_data{hidden} = CGI::escapeHTML($data->{hidden}) ; + $row_data{hidden} = $data->{hidden}; $row_data{isurl} = CGI::checkbox( -name => "isurl$i", -id => "isurl$i", -checked => $data->{'isurl'}?'checked':'', diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index e6d2231..262ebea 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -189,9 +189,9 @@ if ( $op eq 'add_form' ) { . "\" id=\"tagsubfield\" />"; $row_data{subfieldcode} = $data->{'tagsubfield'} eq '@'?'_':$data->{'tagsubfield'}; $row_data{urisubfieldcode} = $row_data{subfieldcode} eq '%' ? 'pct' : $row_data{subfieldcode}; - $row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} ); - $row_data{libopac} = CGI::escapeHTML( $data->{'libopac'} ); - $row_data{seealso} = CGI::escapeHTML( $data->{'seealso'} ); + $row_data{liblibrarian} = $data->{'liblibrarian'}; + $row_data{libopac} = $data->{'libopac'}; + $row_data{seealso} = $data->{'seealso'}; $row_data{kohafield} = { id => "kohafield$i", values => \@kohafields, @@ -226,7 +226,7 @@ if ( $op eq 'add_form' ) { -label => '', -id => "mandatory$i" ); - $row_data{hidden} = CGI::escapeHTML( $data->{hidden} ); + $row_data{hidden} = $data->{hidden}; $row_data{isurl} = CGI::checkbox( -name => "isurl$i", -id => "isurl$i", @@ -235,7 +235,7 @@ if ( $op eq 'add_form' ) { -label => '' ); $row_data{row} = $i; - $row_data{link} = CGI::escapeHTML( $data->{'link'} ); + $row_data{link} = $data->{'link'}; push( @loop_data, \%row_data ); $i++; } @@ -299,7 +299,7 @@ if ( $op eq 'add_form' ) { values => \@authtypes, default => $data->{'authtypecode'}, }; - $row_data{link} = CGI::escapeHTML( $data->{'link'} ); + $row_data{link} = $data->{'link'}; $row_data{row} = $i; push( @loop_data, \%row_data ); diff --git a/catalogue/image.pl b/catalogue/image.pl index f347640..360546b 100755 --- a/catalogue/image.pl +++ b/catalogue/image.pl @@ -26,7 +26,7 @@ use strict; use warnings; -use CGI qw ( -utf8 ); #qw(:standard escapeHTML); +use CGI qw ( -utf8 ); use C4::Context; use C4::Images; -- 2.1.0