21280 Posts in 5729 Topics by 2600 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 945 Views |
-
space before XML invalidates feedburner feed

14 May 2009 at 7:03pm
I'm trying to use Feedburner with a blog but it keeps rejecting the feed because the XML declaration starts on the second line.
How do I remove that first line from the feed?
I've tried adding
$body = ltrim($body);
to outputToBrowser in RSSFeed.php but that doesn't change the output.Any suggestions?
I had this problem in the past (pre 2.3.0) and found a fix but can't remember how I made it work. I'm currently using 3.3.2 beta 1.
-
Re: space before XML invalidates feedburner feed

15 May 2009 at 11:52am
The (very crude) fix for this is to strip the XML statement from the start of the feed. In sapphire/api/RSSfeed.php, line 189 is:
echo $body;
I added a new line above to remove the XML declaration:
$body=str_replace("<?xml version=\"1.0\"?>","",$body);
echo $body;The feed now validates in Feedburner so I am assuming it is valid for the majority of browsers.
| 945 Views | ||
|
Page:
1
|
Go to Top |

