function xmlspecialchars($str) { return str_replace(''',''',htmlspecialchars($str,ENT_QUOTES,'UTF-8')); }