Bugzilla – Attachment 47822 Details for
Bug 15771
CGI::escapeHTML should not be used anymore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 15771: Do not use CGI::escapeHTML anymore
SIGNED-OFFBug-15771-Do-not-use-CGIescapeHTML-anymo.patch (text/plain), 4.42 KB, created by
Héctor Eduardo Castro Avalos
on 2016-02-09 17:15:20 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 15771: Do not use CGI::escapeHTML anymore
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-02-09 17:15:20 UTC
Size:
4.42 KB
patch
obsolete
>From 2ba9cb337d26d85aab50ab7576a690e9c03fe84a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 9 Feb 2016 15:41:14 +0000 >Subject: [PATCH] [SIGNED-OFF]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 > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised >--- > 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} = "<input type=\"hidden\" name=\"tagsubfield\" value=\"".$data->{'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; > >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15771
:
47813
| 47822