StressFree | David Harrison

Open source development & digital architectural collaboration

'Fixing' Joomla's RSS feed

Submitted by David on 26 January 2006 - 10:13am
Printer-friendly version

By default Joomla changes all formatting in RSS feeds to CDATA (ie non-html interpretable) fields. This creates ugly and very difficult to read feeds sometimes. To fix this edit the following file:

$JOOMLA_DIRECTORY/components/com_rss/rss.php

Find the line that reads:

$item_description = mosHTML::cleanText( $item_description );

at approximately line 197, comment it out.
This should create more aesthetically pleasing RSS feeds (with working hyperlinks and image tags).

Next go to about line 266 where the line that reads: '$item_link = sefRelToAbs( $item_link );' and add:

$item_link = $info[ 'link' ] . $item_link; 

This will add absolute links to your feed which is good when using Feedburner. I recommend using FeedBurner as a frontend to your RSS feeds as not only does it provide useful statistical services it also saves on bandwidth and has options to generate universal (RSS 1.0/RSS 2.0/Atom) feeds to ensure compatability with the various readers.