liamzebedee
liamzebedee

Reputation: 14490

What are the supported elements in the RSS 2.0 description tag?

My problem is I have a php script that produces an RSS feed. It loads the description from an SQL database. The SQL database table is also used to show new posts on my websites homepage. When a user submits a post it can contain a <li> tag. Apparently these are not supported in the RSS 2.0 specification. But I can't seem to find a list that shows the tags that are supported.

Here is the feed validation link-

http://validator.w3.org/feed/check.cgi?url=http://cryptum.net/post_feed.php

Upvotes: 2

Views: 625

Answers (2)

amateur barista
amateur barista

Reputation: 4520

Using CDATA should be perfectly ok.

Upvotes: 0

Michael Irigoyen
Michael Irigoyen

Reputation: 22947

In XML, characters such as < and & are illegal in elements, so you must escape any elements that will include them. Therefore, you should escape the <description> as character data, telling the XML parser to ignore anything in between the <![CDATA[ and the ]]>.

<description><![CDATA[<p>Your text.</p>]]></description>

Upvotes: 3

Related Questions