<? function Text2html($txt){ $txt = str_replace(" ","",$txt); $txt = str_replace("<","<",$txt); $txt = str_replace(">",">",$txt); $txt = preg_replace("/[rn]{1,}/isU"," rn",$txt); return $txt; } ?>
来源: http://www.phpxs.com/code/1003308/