php - Which is better for encoding HTML for RSS? -
i introduced html rss feeds publish (which had plain text, no markup), , wondering method better: use character encoding (such htmlspecialchars) or encapsulate in cdata?
it seems me cdata might easier, i'm unclear whether there might reasons (subtle or otherwise) choosing 1 approach versus other. (for starters, cdata approach easier read when viewing source...)
cdata data should not parsed xml parser. tags not in cdata block will parsed xml parser , may take on different meaning.
cdata can incur overhead parsers if there no need it. try avoid cdata blocks time know html (or otherwise) won't used, otherwise use it.
that said, agree jamesh, in should prefer atom on rss. produce feed reader , when scraping feeds, prefer atom on rss.
Comments
Post a Comment