From W3C Wiki

Encoding Content in RSS 1.0

How to encode content in a RSS 1.0 feed is an unsolved problem, many persons have made different problems and there's no consensus for a definitive solution.

content:encoded with CDATA

RSS 1.0 Content Module


<content:encoded><![CDATA[<p>What a <em>beautiful</em> day!</p>]]></content:encoded>

content:encoded without CDATA


<content:encoded><p>What a <em>beautiful</em> day!</p></content:encoded>


Proposal: DanBri


<content:unencoded rdf:parseType="Literal"><p>What a <em>beautiful</em> day!</p></content:unencoded>


Is there any other ways to do it for RSS 1.0

Encoding content in RSS 2.0

How to encode content in a RSS 2.0 feed has proposed recently in A few examples for RSS 2.0. It doesn't define any mandatory behaviour only examples.

Encoding HTML tags


<description><p>What a <em>beautiful</em> day!</p>;</description>

Encoding HTML tags usind a cdata comment


<description><![CDATA[<p>What a <em>beautiful</em> day!</p>]]></description>

Encoding content in Atom

There are two ways to do this in Atom, analogous to RSS 1.0's content:encoded and DanBri's proposal of content:unencoded.

This model applies to all elements that allow markup: <name>, <title>, <tagline>, <copyright>, <info>, <summary>, and <content>

For entity escaped content, it is:

<content type="text/html" mode="escaped"><p>What a <em>beautiful</em> day!</p></content>

Of course, CDATA could be used for escaping in that situation too.

For literal, or inline XML, it is:

<content type="application/xhtml+xml"><p xmlns="">What a <em>beautiful</em> day!</p></content>

Note the default namespace declaration on the

element to specify the XHTML namespace for the children elements. Atom requires all of the child elements to be in their appropriate namespace, and convention is to use a

or element for that purpose.

Note: As of Jun2004, there are proposals for modifying the content model of all elements that allow markup in Atom, the above applies to the Atom 0.3 draft.