Skip to:
Content
Pages
Categories
Search
Top
Bottom

HTML content not enclosed within CDATA block

  • I have an installation of bbpress 0.9 (installed independent from WordPress).

    When I pull the rss feed, I get code that looks like this:

    <item>
    <title>Anonymous on "Hello"</title>
    <link>http://forums.brynmawr.edu/topic.php?id=2#post-8</link>
    <pubDate>Fri, 29 Aug 2008 21:45:22 +0000</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <guid isPermaLink="false">8@http://forums.brynmawr.edu/</guid>
    <description><p>test
    </p></description>
    </item>

    The <p> is a <p> tag that is entity-encoded (I presume so that <p> won’t be parsed as an XML tag by an XML parser).

    This is causing an issue with the feed parser that I am using (lastRSS): the parser is passing the <description> contents through unchanged, and so I’m getting literal “<p>” and “<p/>” on the pages that use lastRSS.

    I believe that the standard method of embedding HTML into an XML feed (or any XML document) is to use CDATA blocks:

    <description><![CDATA[<p>test
    </p>]]></description>

    and this is the way feeds from wordpress, blogger, etc are formatted. bbpress should really do the same thing so that feed parsers like lastRSS will pass through correct HTML (in this example, text wrapped by a paragraph tag, rather than text with character entities that cause the browser to display the literal characters)

    Can the feed generator code be changed to use CDATA blocks?

    Thank you.

  • You must be logged in to reply to this topic.
Skip to toolbar