package Header;
use CGI();
+use HTML::Entities();
use Socket;
use Time::Local;
};
};
-### Read IPFire Buildversion
-$FIREBUILD = "File not found: firebuild\n";
-if (open(MYFile, "<${swroot}/firebuild")) {
- $FIREBUILD = <MYFile>;
- chomp($FIREBUILD);
- $FIREBUILD = "(Build: $FIREBUILD)";
- close(MYFile);
-};
-
require "${swroot}/langs/en.pl";
require "${swroot}/langs/${language}.pl";
eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;
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;
- $outstring =~ s/>/>/g;
- return $outstring;
+
+ return escape($outstring);
}
sub connectionstatus