Re: Filter out MS Word 'quotes' for RSS
| From: | Richard Lynch | Date: | Wed, 26 Apr 2006 23:04:48 +0000 |
| Subject: | Re: Filter out MS Word 'quotes' for RSS | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-234887@lists.php.net to get a copy of this message | ||
On Wed, April 26, 2006 4:45 am, Kevin Davies wrote:
> I've got a forum/blog system which is displaying correctly in the
> browser.
> However, I've also got an RSS feed that is created from the data
> entered.
>
> It seems that some of the users are copying and pasting from MS Word
> or
> other packages, and this means that strange quote marks (among others)
> are
> appearing, and breaking the RSS feed.
>
> Obviously I need to convert these on entry, or on output into RSS.
> Does
> anyone know of an easy way to do this, or is it a case of identifying
> each
> unusual character individually?
>
> I've been searching on Google for some advice on this, but not found
> anything so far...
There is a huge thread on php.net in str_replace and/or preg_replace
about this, only for HTML Entities.
You're on your own to figure out what is the "best" RSS entitiy to use
for those oddball characters.
--
Like Music?
http://l-i-e.com/artists.htm