ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

RSS feed needs CDATA to validate, is this an issue?

September 01, 2011 11:21am

Subscribe [1]
  • #1 / Sep 01, 2011 11:21am

    JamesBrighton

    146 posts

    I need to make an RSS feed for a channel. The issue is that the content has been imported and contains inline styles and other markup. Ive looked at the various modules but I can’t get it all removed, and some of it stops my feed from validating.

    One work around that seems to work is this:

    <![CDATA[ {my_field} ]]>

    From what ive read this stops the content from being xml parsed, which is why it validates ok. Ive looked in a few readers and it seems fine, but is their a risk / downside to this method? I don’t really understand the implications so id appreciate any advice or info on tests I could perform.

    Thanks

  • #2 / Sep 01, 2011 4:23pm

    Lisa Wess

    20502 posts

    Hi JamesBrighton,

    Our default templates using CDATA, so this shouldn’t cause you any problems.

  • #3 / Sep 20, 2011 6:03am

    JamesBrighton

    146 posts

    Are there any resources that say what sort of markup is likely to be displayed properly in RSS readers and what you should avoid using? Thanks

  • #4 / Sep 20, 2011 1:00pm

    Lisa Wess

    20502 posts

    Hi, James -

    There are probably several, you could start with the W3C site for your research. =)

  • #5 / Sep 20, 2011 1:03pm

    JamesBrighton

    146 posts

    Actually I cant find much at all. This is the spec but it doesn’t include any formatting to use within content:
    http://feed2.w3.org/docs/rss2.html

    The validation service lets anything validate if its within CDATA, but that doesn’t mean its ‘good’ code:
    http://validator.w3.org/feed/

  • #6 / Sep 20, 2011 2:03pm

    Lisa Wess

    20502 posts

    Hi, James -

    I’m just not that intricately familiar with RSS.  I’m going to shift this down to Community Help in case others have some input on that.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases