X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=config%2Fcfgroot%2Fheader.pl;h=fb574822228e18e9ed466aaebf0876c3aa878f5f;hp=e0f18df153521a87e6c431321c69ed241de7f84a;hb=2ac39db92e9b6117d64940f8b0572a24afa07b33;hpb=eb95ce89a8effefa0c6aa27bf6f048926d21fed0 diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index e0f18df15..fb5748222 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -12,6 +12,7 @@ package Header; use CGI(); +use HTML::Entities(); use Socket; use Time::Local; @@ -302,16 +303,16 @@ sub IpInSubnet return (($ip >= $start) && ($ip <= $end)); } -sub cleanhtml -{ +sub escape($) { + my $s = shift; + return HTML::Entities::encode_entities($s); +} + +sub cleanhtml { my $outstring =$_[0]; $outstring =~ tr/,/ / if not defined $_[1] or $_[1] ne 'y'; - $outstring =~ s/&/&/g; - $outstring =~ s/\'/'/g; - $outstring =~ s/\"/"/g; #" This is just a workaround for the syntax highlighter - $outstring =~ s//>/g; - return $outstring; + + return escape($outstring); } sub connectionstatus