Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.3k views
in Q2A Core by

My RSS feeds are broken. It seems that there is a blank line on top of each rss file. I tried it with all themes without result. How and where can i remove the first blank line?

Here's a sample: http://ghbnee.nl/feed/qa.rss

Q2A version: latest
related to an answer for: My RSS feed is broken

1 Answer

+2 votes
by
edited by

You have not a blank line but some bytes echoed before the content of most of your pages :

rss page :

 

home page :

 

the bytes are : \ufeff , also know as BOM

you can also test your pages with this utility to see its presence :

http://people.w3.org/rishida/utils/bomtester/index.php?filename=http%3A%2F%2Fghbnee.nl%2Ffeed%2Fqa.rss

http://people.w3.org/rishida/utils/bomtester/index.php?filename=http%3A%2F%2Fghbnee.nl%2F

http://people.w3.org/rishida/utils/bomtester/index.php?filename=http%3A%2F%2Fghbnee.nl%2Fcategories

Usually it's generated by windows editors (but it could also be echoed programmatically by your code...) and used to mark a page as utf8.

It should be invisible, but it also originates issues sometimes ( http://www.w3.org/International/questions/qa-byte-order-mark )

Check with your developers for the reason of its presence in the qa-include\qa-feed.php;

in fact the http response header "Content-type"  to this http request  http://ghbnee.nl/feed/qa.rss is

Content-Type:text/xml; charset=utf-8
 
but the body of the response contains an xml with this header :
 
<?xml version="1.0" encoding="ISO-8859-15"?>

(check line 291 of qa-feed.php)

I think that not using the BOM in this case could be ok...

 

...