Avoid using "<![CDATA[ ... ]]>" in RSS
The article discusses the drawbacks of using CDATA in RSS feeds. It highlights that while CDATA may seem convenient for escaping XML special characters, it introduces complexity and potential confusion. The author recommends using standard XML escaping methods instead for better uniformity and simplicity.
- ▪CDATA is commonly used in RSS feeds to escape XML special characters.
- ▪Using CDATA can lead to less readable code and complicate debugging.
- ▪Standard XML escaping is simpler and more uniform than using CDATA.
Opening excerpt (first ~120 words) tap to expand
Avoid using "<![CDATA[ ... ]]>" in RSS Published on 11/05/2026 Updated on 12/05/2026 #rant#rss <![CDATA[ ... ]]> is very commonly used in RSS (also Atom) feeds to escape XML special characters. At first glance, it looks very convenient, you simply add <![CDATA[ ... ]]> blocks and write any (almost) content inside of them without worrying about escaping characters: <item> <title><![CDATA[Using <CDATA> in Titles]]></title> <link>http://example.com</link> <description> <![CDATA[ <p>This description contains <strong>HTML markup</strong>.</p> <p>It allows us to use characters like "<b>&</b>" and brackets directly.</p> ]]> </description> </item> Table of contentsWhy not CDATA?What to do instead?ConclusionWhy not CDATA? CDATA seems to be perfect, isn't it? Except it's not possible to escape some…
Excerpt limited to ~120 words for fair-use compliance. The full article is at WaspDev Blog.