ruby/rss

Anyway to generate content as CDATA?

Closed this issue · 3 comments

This is helpful when there're XML/HTML tags inside summary contents. But I did not find a way to achieve it. A method from StackOverflow doesn't work now.

Ruby version: ruby 2.7.0p0 (2019-12-25 revision ruby/ruby@647ee6f091)

kou commented

Why do you want to use <![CDATA[...]]>?
<![CDATA[...]]> and escaped text are logically same in XML.

hmm.. I wrote a script to generate a feed for myself. But it seems my reader only decodes HTML escape characters back but take them as plain text, not HTML/XML tags. While <![CDATA[...]]> works.

If they're the same according to spec, there should be some problem with my reader. But at least I can manually add CDATA tag and finally decode it back.. Thanks.

kou commented

Could you report this to your reader?