Re: MS Word text pasted into forms

From: Date: Thu, 20 Dec 2001 22:30:20 +0000
Subject: Re: MS Word text pasted into forms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78363@lists.php.net to get a copy of this message
Jim, Have you tried a regular expression. Something like ereg_replace("[^[:alnum:]|[:space:]|[:punct:]@]", "", $string); to clean the string? Gerard O On Thu, 20 Dec 2001 17:02:58 -0500, jimtronic wrote: > >Occasionally, I have a problem dealing with some of the special >characters from text authored in MS Word, and then pasted into a web >form. It seems that somewhere something bad happens and what >eventually gets put into mysql via php is not correct. > >In particular, I have trouble with apostrophes and accented vowels. > >Is the solution to disallow users (it's an admin, so this is >realistic) from pasting from MS Word? > >-- >Jim Musil >--------- >Multimedia Programmer >Nettmedia >------------- >212-629-0004 >jim@nettmedia.com > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#78363) next »