What is better for coding HTML for RSS?

I recently submitted HTML to some RSS feeds that I am posting (which so far had only text, no markup), and I was wondering which method is better: use character encoding (e.g. htmlspecialchars) or just encapsulate everything in CDATA ?

It seems to me that CDATA might be simpler, but I don’t understand if there can be some reasons (subtle or different) for choosing one approach compared to another. (For starters, the CDATA approach will be easier to read when viewing the source ...)

+3
source share
4 answers

CDATA , XML. CDATA XML .

CDATA , . CDATA , , HTML ( ) , .

, jamesh , Atom RSS. , Atom RSS.

+4

CDATA , HTML .

HTML, , HTML

+3

, : Atom RSS.

Atom - XML , XHTML , , .

, RSS, , Atom, , .

Atom IETF, RSS.

0

Source: https://habr.com/ru/post/1698765/


All Articles