November 28, 2008

Expression Engine images in RSS feed

Article about ▸

written by Marek Foss

Expression Engine (EE) is running this blog, and I have to say — EE is so much better than Wordpress. First of all, the control panel is so intuitive. Secondly, making templates is so simple. Thirdly, writing plugins is so obvious, that I really have no idea why Wordpress is still the blogging platform. But then again, the crowd is often wrong... Anyway, one irritating and not much documented bug is that EE doesn’t show images or any formatting when using default RSS feed template. Here’s how to fix it.

The problem is in the description tag, which contents are XML encoded. The default template post is inserted in the RSS using the following code:

<description>{exp:xml_encode}{summary}{body}{/exp:xml_encode}</description>

However, this produces raw text, stripping all images and HTML formatting from your post. A quick fix for that is to replace that line with such code:

<content:encoded><![CDATA[{summary}{body}]]></content:encoded>

And that’s it. You will see your images, paragraphs and such, all displayed correctly in, for example Google Reader (my feed reader of choice, btw). I wonder why don’t they use that by default? Also, I think the default EE Atom template could work better, but if you stick with EE handling your feeds, you’d better change that RSS part. Or use Atom and FeedBurner, it has an automatic on-the-fly conversion to any feed format your users require.


If you liked the article, please spread the word and share it!

  • Share

Comments


summer writes:

thanks!  this was really helpful



Leave a comment: (comments may not appear immediately due to page caching)

Name: Email: (not disclosed)

WWW: Remember my details

Notify me of follow-up comments

Feed me:

to feed
  • Subscribe and get the new articles every now and then directly in your reader — I recommend using Google Reader

Facebook:

Connect:

 by Google
Google FriendConnect appears to be down at the moment. Sorry for inconvenience.
Related Posts with Thumbnails