htmlentities() does not remove escape

From: Date: Sun, 27 Jan 2008 18:27:26 +0000
Subject: htmlentities() does not remove escape
Groups: php.general 
Request: Send a blank email to php-general+get-268172@lists.php.net to get a copy of this message
Hello: I have a form that has a textarea and I do not want to disallow the use of single quote as apostrophe, or for any other normal stylization. So I am using html entities to change these characters into html entities. But the function does not remove the escapes added by the browser when sending the input. Is there a special function in php for removing the \ escapes as well? My plan b would be to look for a similar function in javascript and convert to html entities before the input is sent to the server. I want to screen for damaging code but do not want to prevent legitimate use of punctuation. If the input in the text field is then displayed as html (which it will be) I do not want things like 'It\'s a nice day' showing up in the html. Thanks in advance; Jeff k

« previous php.general (#268172) next »