if (!defined($enddate) or $enddate !~ s/^\s*(\S+)\s*$/$1/) { # strip spaces, remove Taint
$enddate = format_date($todaysdate);
}
if (!defined($ratio) or $ratio !~ s/^\s*(0?\.?\d+)(\.0*)?\s*$/$1/) { # strip spaces, remove Taint
if (!defined($ratio)) {
$ratio = 3;
if ($ratio == 0) {
# Force to be a number
$ratio += 0;
if ($ratio <= 0) {
$ratio = 1; # prevent division by zero
-