日期:2013-04-20  浏览次数:20407 次

function safe_convert($string$html=0) { //Words Filter
    
if ($html==0
) {
        
$string=htmlspecialchars($stringENT_QUOTES
);
        
$string=str_replace("<","<",$string
);
        
$string=str_replace(">",">",$string
);
        
$string=str_replace("\\"'\'$string
);
    } else {
        
$string=addslashes($string
);
        
$string=str_replace("\\\\"'\'$string
);
    }
    
$string=str_replace("\r","<br/>",$string
);