I'm trying to code a script that generates a RSS feed, but the data being output keeps throwing XML parse errors. I think I've narrowed it down to possibly line-feed or carriage return throwing the error, but it might be anything.
I've been passing the data through the below code to try to get rid of the bad characters:
$str = str_replace(chr(10), "", $str);
$str = str_replace(chr(13), "", $str);
$str = htmlentitites($str);
Despite the lines above, I'm still getting XML parse errors. Any ideas?
I've been passing the data through the below code to try to get rid of the bad characters:
$str = str_replace(chr(10), "", $str);
$str = str_replace(chr(13), "", $str);
$str = htmlentitites($str);
Despite the lines above, I'm still getting XML parse errors. Any ideas?