Re: Cleaning user data
| From: | Justin French | Date: | Thu, 20 Mar 2003 05:09:35 +0000 |
| Subject: | Re: Cleaning user data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140397@lists.php.net to get a copy of this message | ||
on 20/03/03 3:53 PM, John W. Holmes (holmes072000@charter.net) wrote:
>> And yes, definitely striptags(), and follow the advice on the rest of
> the
>> thread.
>
> I disagree. I think stripping HTML from my text is a horrible thing. If
> I want to put a <b> in my text, then use htmlentities() and show me a
> <b> when I look at it. Obviously you don't want to "evaluate" HTML, but
> the end result should be that I should see exactly what I typed into the
> text box.
Depends if you want to allow formatting... I don't :)
I also haven't had the need to *display* HTML on any of my sites, so
stripping tags is what *I* do.
> If you need to allow formatted text, then use something like BBcode
> where you can specify exactly what is allowed.
Yes.
Justin