]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/cfgroot/header.pl
Remove /var/ipfire/firebuild.
[people/teissler/ipfire-2.x.git] / config / cfgroot / header.pl
index e0f18df153521a87e6c431321c69ed241de7f84a..299d7664599290d5a7a4c828746d58c820d0d633 100644 (file)
@@ -12,6 +12,7 @@
 package Header;
 
 use CGI();
+use HTML::Entities();
 use Socket;
 use Time::Local;
 
@@ -87,15 +88,6 @@ if ( -d "/var/ipfire/langs/${language}/" ) {
     };
 };
 
-### 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`;
@@ -302,16 +294,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/&/&amp;/g;
-       $outstring =~ s/\'/&#039;/g;
-       $outstring =~ s/\"/&quot;/g; #" This is just a workaround for the syntax highlighter
-       $outstring =~ s/</&lt;/g;
-       $outstring =~ s/>/&gt;/g;
-       return $outstring;
+
+       return escape($outstring);
 }
 
 sub connectionstatus