1 |
slords |
1.1 |
diff -up e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm.fix-comment e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm |
2 |
|
|
--- e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm.fix-comment 2010-11-29 10:15:23.000000000 -0700 |
3 |
|
|
+++ e-smith-hosts-2.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/hostentries.pm 2010-11-29 10:17:04.000000000 -0700 |
4 |
|
|
@@ -33,6 +33,7 @@ use File::Basename; |
5 |
|
|
use Exporter; |
6 |
|
|
use Carp; |
7 |
|
|
use Net::IPv4Addr; |
8 |
|
|
+use HTML::Entities; |
9 |
|
|
|
10 |
|
|
our @ISA = qw(esmith::FormMagick Exporter); |
11 |
|
|
|
12 |
|
|
@@ -245,7 +246,7 @@ sub print_host_row |
13 |
|
|
$self->print_td($self->localise($host_record->prop('HostType')) || " "); |
14 |
|
|
$self->print_td($ip); |
15 |
|
|
$self->print_td($host_record->prop('MACAddress') || " "); |
16 |
|
|
- $self->print_td($host_record->prop('Comment') || " "); |
17 |
|
|
+ $self->print_td(HTML::Entities::encode($host_record->prop('Comment')) || " "); |
18 |
|
|
my $static = $host_record->prop('static') || "no"; |
19 |
|
|
if ($static ne 'yes') { |
20 |
|
|
my $propstring = $self->build_host_cgi_params($host_record->key(), $host_record->props()); |
21 |
|
|
@@ -289,7 +290,7 @@ sub build_host_cgi_params { |
22 |
|
|
global_ip => $oldprops{ExternalIP}, |
23 |
|
|
ethernet_address => $oldprops{MACAddress}, |
24 |
|
|
hosttype => $oldprops{HostType}, |
25 |
|
|
- comment => $oldprops{Comment}, |
26 |
|
|
+ comment => HTML::Entities::encode($oldprops{Comment}), |
27 |
|
|
); |
28 |
|
|
|
29 |
|
|
return $self->props_to_query_string(\%props); |
30 |
|
|
@@ -498,7 +499,7 @@ sub print_confirmation_details { |
31 |
|
|
next unless $val; |
32 |
|
|
my $label = $label_map{$f} || uc($f); |
33 |
|
|
print $q->Tr (esmith::cgi::genSmallCell($q, $self->localise($label),"normal"), |
34 |
|
|
- esmith::cgi::genSmallCell($q, $val,"normal")); |
35 |
|
|
+ esmith::cgi::genSmallCell($q, HTML::Entities::encode($val),"normal")); |
36 |
|
|
} |
37 |
|
|
|
38 |
|
|
print qq(</table>); |