Re: Removing security-problematic chars from strings

From: Date: Fri, 21 Nov 2003 12:08:34 +0000
Subject: Re: Removing security-problematic chars from strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170549@lists.php.net to get a copy of this message
Troy S wrote:
What is the best way to remove the characters from strings that may cause security problems? Namely, `, ', ", <, >, \ and all non-printing strings. Did I miss any? Thanks.
Why do you need to remove them? So I can't type <grin>? Is that a security violation? All you need to do is use htmlentities() and/or addslashes() to protect data being displayed or entered into a database. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#170549) next »