|
Posted by Manuel Lemos on 08/10/05 19:57
Hello,
on 08/10/2005 10:05 AM Greg Schnippel said the following:
> I wrote a custom blog/CMS script that I use to generate RSS feeds.
> Every so often, in the process of cutting and pasting from other sites
> I will inadvertently enter a bad character that RSS doesn't like which
> causes the whole feed to break. (For example, versions of quotation
> marks or long dashes). My solution now is to check the feed at
> feedvalidator.org and then edit any offending characters by hand.
>
> Does anyone know an easier way to do this? In truth, I'm not sure I
> know what kind of characters are valid and which are not and why. Is
> there an easy way to validate and correct any incoming text?
There is no such thing as invalid RSS characters. All characters are
valid as long as they are properly encoded to include in XML documents.
If you are not sure how to do it, you may want to take a look at this
RSS writer and XML writer classes that do it properly:
http://www.phpclasses.org/rsswriter
http://www.phpclasses.org/xmlwriter
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Navigation:
[Reply to this message]
|