Difference between description and content:encoded tags in RSS2
The <description>
tag is for the summary of the post, but in plain text only. No markup.
You can get around that if you escape the tags or wrap the content in:
<![CDATA[ post body goes <strong>here</strong> ]>
But you're not really supposed to be doing that.
If you want markup, you're supposed to use <content:encoded>
and use the <![CDATA[
and ]>
wrappers here.
The
content:encoded
element can be used in conjunction with thedescription
element to provide an item's full content along with a shorter summary. Under this approach, the complete text of the item is presented incontent:encoded
and the summary indescription
.RSS Best Practices Profile: content:encoded
In short, <description>
is for the summary and the rest of the post is in <content:encoded>
.
Since some readers may not support the tags as expected, you usually see the entire post in <description>
and not a mix of the two.
The previous answer is incorrect.
The RSS 2.0 spec is very clear that you can encode the value of the <description> element.
An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see examples), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.