Re: getting rid of bad characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Have you tried using htmlentities()?  It should convert stuff like double-quotes (") to it's associated HTML entity which, when echo'd to the browser, will be displayed as " again.

Good for safe output.  Not so good for storing in a database (which you'd probably want to use whatever your database's "escape_string" function is).

-TG

= = = Original message = = =

I having been looking for some snippet to help me with changing MS
Word double, quotes, single quotes and other characters to acceptable
HTML safe characters.  The problem comes about when the people using
the forms paste large articles from Word into the form, I do a normal
check and add slashes but lately they have been getting lazy and using
the special characters from Word.


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux