cgi-bin: Remove font tags with no effect, and style tags

The font tag is deprecated, so clean up html by removing
font tags that have no effect.

For font tags that have an effect, move the styling to
the tag controlling the text output.

The aim is to get one step further towards validating html.
This commit is contained in:
Alf Høgemark
2014-02-22 11:59:55 +01:00
parent 582fa15555
commit 8b40eca59e
3 changed files with 12 additions and 11 deletions

View File

@@ -207,20 +207,20 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}) {
print <<END
<table width='100%'>
<tr>
<td width='20%' class='base'><font>$Lang::tr{'dnsforward zone'}:</font></td>
<td width='20%' class='base'>$Lang::tr{'dnsforward zone'}:</td>
<td><input type='text' name='ZONE' value='$cgiparams{'ZONE'}' size='24' /></td>
<td width='30%' class='base'>$Lang::tr{'enabled'}<input type='checkbox' name='ENABLED' $checked{'ENABLED'}{'on'} /></td>
</tr>
<tr>
<td width='20%' class='base'><font>$Lang::tr{'dnsforward forward_server'}:</font></td>
<td width='20%' class='base'>$Lang::tr{'dnsforward forward_server'}:</td>
<td><input type='text' name='FORWARD_SERVER' value='$cgiparams{'FORWARD_SERVER'}' size='24' /></td>
</tr>
</table>
<table width='100%'>
<tr>
<td width ='20%' class='base'><font class='boldbase'>$Lang::tr{'remark'}:</font>&nbsp;<img src='/blob.gif' alt='*' /></td>
<td width ='20%' class='base'>$Lang::tr{'remark'}:&nbsp;<img src='/blob.gif' alt='*' /></td>
<td><input type='text' name='REMARK' value='$cgiparams{'REMARK'}' size='40' maxlength='50' /></td>
</tr>
</table>
@@ -229,7 +229,7 @@ print <<END
<table width='100%'>
<tr>
<td class='base' width='55%'><img src='/blob.gif' alt ='*' align='top' />&nbsp;<font class='base'>$Lang::tr{'this field may be blank'}</font></td>
<td class='base' width='55%'><img src='/blob.gif' alt ='*' align='top' />&nbsp;$Lang::tr{'this field may be blank'}</td>
<td width='40%' align='right'>
<input type='hidden' name='ACTION' value='$Lang::tr{'add'}' />
<input type='submit' name='SUBMIT' value='$buttontext' />

View File

@@ -206,9 +206,9 @@ sub diskbox {
if ( $status[1]=~/standby/){
my $ftime = localtime((stat("/var/run/hddshutdown-$disk"))[9]);
print"<b>Disk $disk status:<font color='#FF0000'>".$status[1]."</font></b> ($Lang::tr{'since'} $ftime)";
print"<b>Disk $disk status:<span style='color:#FF0000'>".$status[1]."</b> ($Lang::tr{'since'} $ftime)";
}else{
print"<b>Disk $disk status:<font color='#00FF00'>".$status[1]."</font></b>";
print"<b>Disk $disk status:<span style='color:#00FF00'>".$status[1]."</b>";
}
}

View File

@@ -133,7 +133,7 @@ print <<END
<table width='95%' cellspacing='0'>
END
;
if ( $message ne "" ) {print "<tr><td colspan='3' align='center'><font color='red'>$message</font>";}
if ( $message ne "" ) {print "<tr><td colspan='3' style='text-align:center; color:red;'>$message</td></tr>";}
my $lines = 0;
my $key = '';
@@ -199,9 +199,9 @@ print "</table>";
############################################################################################################################
sub isrunning
{
{
my $cmd = $_[0];
my $status = "<td bgcolor='${Header::colourred}' align='center'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td>";
my $status = "<td bgcolor='${Header::colourred}' style='text-align:center; color:white;'><b>$Lang::tr{'stopped'}</b></td>";
my $pid = '';
my $testcmd = '';
my $exename;
@@ -219,9 +219,10 @@ sub isrunning
{if (/^Name:\W+(.*)/) {$testcmd = $1; }}
close FILE;
if ($testcmd =~ /$exename/)
{$status = "<td bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td>";}
{$status = "<td style='color:white; background-color:${Header::colourgreen};'><b>$Lang::tr{'running'}</b></td>";}
}
}
return $status;
}
}