function xml_encode($str) {
$str = preg_replace("/".chr(153)."/","(tm)",$str); // trademark
$str = preg_replace("/".chr(174)."\s/","(r) ",$str); // registered tratemark
$str = preg_replace("/".chr(174)."\W?/","(r)",$str); // registered tratemark
$str = preg_replace("/".chr(169)."/","",$str); // copyright
$str = preg_replace("/".chr(194)."/","",$str); // Capital A, circumflex accent
$str = preg_replace("/®/","(r)",$str);
$str = preg_replace("/"/","\"",$str);
$str = preg_replace("/™/","(tm)",$str);
return $str;
}
No comments:
Post a Comment