Here is an example of the RSS format:
rss<rss version="2.0"> <channel> <title>Erik Martín Jordán</title> <link>https://erikmartinjordan.com</link> <description>Code, web development, tech and off-topic</description> <item> <title><![CDATA[ Quick way to transform a number into a string using JavaScript ]]></title> <link>https://erikmartinjordan.com/quick-way-number-string-javascript</link> <description><![CDATA[ Quick way to transform a number into a string using JavaScript. ]]></description> </item> <item> <title><![CDATA[ onBlur prevents onClick to execute ]]></title> <link>https://erikmartinjordan.com/onblur-prevents-onclick-react</link> <description><![CDATA[ Two solutions on how to prevent the onBlur event cancelling the onClick. ]]></description> </item> </channel> </rss>
The inclusion of <![CDATA [ ... ]]>
allows the XML to accept special characters. For example, if you include an ampersand symbol on a title, you'll get an error like this one:
error on line 1 at column 25604: xmlParseEntityRef: no name
Including <![CDATA [ ... ]]>
prevents it, so you won't need to replace all the ampersand symbols or clean the text from special characters.
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.