function HtmlEncode($fString)
{
if($fString!="")
{
$fString = str_replace( '>', '>',$fString);
$fString = str_replace( '<', '<',$fString);
$fString = str_replace( chr(32), ' ',$fString);
$fString = str_replace( chr(13), ' ',$fString);
$fString = str_replace( chr(10) & chr(10), '<br>',$fString);
$fString = str_replace( chr(10), '<BR>',$fString);
}
return $fString;
}
function EncodeHtml($fString)
{
if($fString!="")
{
$fString = str_replace(">" , ">", $fString);
$fString = str_replace("<", "<", $fString);
$fString = str_replace(" ",chr(32),$fString);
$fString = str_replace("",chr(13),$fString);
$fString = str_replace("<br>",chr(10) & chr(10),$fString);
$fString = str_replace("<BR>",chr(10),$fString);
}
return $fString;
}