Is HTML code inside the <description>
tag compliant in RSS 2.0?
2 Answers
The RSS 2.0 specification says that you can include HTML in the description element so long as you properly encode the markup.
You have two ways to do this:
Convert tags to escaped HTML entities:
<description>this is <b>bold</b></description>
Wrap the description content within a
CDATA
section:<description><![CDATA[this is <b>bold</b>]]></description>
You can decode <
and >
char to html code
<
: <
>
: >
-
1
-
And to be safe, the
"
and'
characters too, in addition to&
,<
and>
.– FlimmDec 28, 2016 at 13:50 -
This is the complete list (5 predefined entities): en.wikipedia.org/wiki/… May 3, 2019 at 22:52