Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe to WebmasterWorld
Help: Escaping Text/HTML for an RSS Feed What's the best way to escape Text/HTML using PHP? hiker_jjw msg:1541323 6:47 pm on Mar 5, 2005 (gmt 0) I've created an RSS 2.0 Feed for a friend of mine using PHP and MySQL. The author writes a ton of articles. I've worked out all the details of creating the feed in PHP, except for escaping characters for XML/RSS.
What's the best way to escape Text/HTML for an RSS 2.0 Feed using PHP? Can RSS descriptions contain HTML?
And... How might I escape out those "Mikrsooft" characters that I know the author will copy into the RSS descriptions?
Thanks in advance,
hiker_jjw msg:1541324 3:39 am on Mar 8, 2005 (gmt 0)
hmmm.... I guess nobody knows... Or is this posted in the wrong forum? werty msg:1541325 4:47 am on Mar 8, 2005 (gmt 0)
I think this is the correct forum, but I do now if anyone knows the answer. burnsal msg:1541326 11:37 am on Mar 8, 2005 (gmt 0)
You do need escape characters in an RSS Feed. You can use The codes that start with &xx; etc. There are only a few you really need to consider ie < >
You can use html in an RSS feed, in my opinion though you should not use them as the feeds will be parsed and the user should decide how to view them.
You can also use cdata within your feed, it means all chsracters between the brackets should be shown as literal ie you do not need to use escape characters.
Do a search on google, there is some info out there.