On 4/26/06, Kevin Davies <kevin.davies@xxxxxxxxxxxx> wrote: > Hi All, > > 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 don't think there's anything to do this for you. If it's only quotes you could do it quite simply. str_replace lets you use arrays for both search and/or replace parameters, so: $bad_chars = array(...); $good_chars = "'"; $text = str_replace($bad_chars, $good_chars, $text); -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php