Share » Forums » Developer » RSS and languages with FireFox

RSS and languages with FireFox

RSS and languages with FireFox

Thursday 26 March 2009 9:23:24 am - 1 reply

Author Message

Jaime Smith

Tuesday 19 May 2009 11:00:38 am

Hey Caroline,

The problem with Firefox showing unstyled XML is because ez publishes RSS with the text/xml mime-type and Firefox needs it to be set to application/rss+xml. To make things worse IE doesn't understand the application/rss+xml mime type and will choke on that. I haven't found an easy way to get around this with overrides so I had to edit the kernel/rss/feed.php file to make the changes necessary to work for IE and others. Here's what I did.

Add the code below towards the bottom of the file just before the calls to the PHP header function. You'll need to remove the original call to the header('Content-Type.

Hope that helps.

if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'msie') === false ) { 	 
	header( 'Content-Type: application/rss+xml; charset=' . $httpCharset );
} else {
	header( 'Content-Type: text/xml; charset=' . $httpCharset );
} 

Jaime Smith
Senior Developer
Certified ezPublish Developer
http://www.duoconsulting.com > Duo Consulting, Chicago, IL, USA

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu