Re: Invalid Characters
| From: | Duncan Hill | Date: | Tue, 08 Aug 2000 14:38:34 +0000 |
| Subject: | Re: Invalid Characters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10674@lists.php.net to get a copy of this message | ||
On Tue, 8 Aug 2000, Mukul Sabharwal wrote:
> I was wondering what characters should not be taken as a valid
> input, as in for database storage. I know html and javascript, but
> apart from that. could you list
Perhaps the easier approach is to define what you want to allow, and
deny everything else?
Ie, if the field is a name, and you're dealing only with 8859-1
characters (I think), then a-z,A-Z, space, period and single quote are
all that you should need (and the quote may beed to be escaped).
This makes it easier, rather than compiling a huge list of denied
characters. Same as one the the firewall concepts: deny everything,
allow what you need.
--
Duncan Hill Sapere aude
My mind not only wanders, it sometimes leaves completely.