News for hackers. Stuff that matters.
Re:Avoid Using "< [Cdata[ ]]>" in RSS by senfiaj on Friday May 29, 2026 @05:01AM (#48320778)
Just out of curiosity, I looked at the HN RSS feed and they still use regular escape for titles (and some other things, except description). It means they use 2 versions of escape instead of 1. So why not just use 1?
Re:Avoid Using "< [Cdata[ ]]>" in RSS by kijin on Friday May 29, 2026 @06:58AM (#48321531)
Different requirements.

The description contains HTML markup, such as <p></p> for paragraph breaks. CDATA is a nice and clean way to encode them without breaking anything.

The title doesn't contain any markup, and shouldn't. A good old escape function covers both the "doesn't" part and the "shouldn't" part.

Re:Avoid Using "< [Cdata[ ]]>" in RSS by senfiaj on Friday May 29, 2026 @07:15AM (#48321670)
What requirments are you talking about? Human readability? IMHO, RSS is for feed readers, not humans. When looking at https://news.ycombinator.com/rss , the RSS isn't that human friendly at all, all line breaks are removed. The point is the simplicity and uniformity, regular escape works well for many cases, not just description.