Search code examples
validationrsstagsfeed

Is description tag of RSS feed is a correct one


I am just wondering if we can use multiple

<![CDATA[ ....some text... ]]>

elements within tag of RSS?

RSS 2.0 at Harvard Law says nothing about it.

And I am wondering if that tag is a correct one:

<description>
<![CDATA[ <img src=" ]]>
http://www.anynamewebsite.com/us/system/news/content/2012/09/19/20276/375_Molaxy_note_II__Flip_Cover_Photo_1.jpg
<![CDATA[ " border=0><br />  ]]>
<![CDATA[ blah, blah ]]>
</description>

I use this tool http://validator.w3.org/feed to validate RSS and it says that RSS is valid but anyway shows some recommendations to correct.

So I am not sure who is right either RSS 2.0 format or http://validator.w3.org/feed ?

Thanks in advance!


Solution

  • Sure; CDATA doesn't affect the structure of your XML. Any client parsing that document will see a single <description> element containing text. This is general XML behaviour; your validation warnings aren't due to that decision.