Dealing With User Entering a Script

From: Date: Fri, 22 Jul 2016 18:19:21 +0000
Subject: Dealing With User Entering a Script
Groups: php.general 
Request: Send a blank email to php-general+get-325656@lists.php.net to get a copy of this message
I dug back to see where I git the idea of using htmlentities() on user input. This came from the book Modern PHP and deals with a user entering in a text box something like: <script>window.location.href='http://example.com';</script> Is there a better way of dealing with this? For context, I am creating a user registration field and there is a textarea field for their bio. Thank you! -- Stephen

« previous php.general (#325656) next »