Re: HTML Character Parsing
| From: | David Robley | Date: | Fri, 12 Apr 2002 04:07:43 +0000 |
| Subject: | Re: HTML Character Parsing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92708@lists.php.net to get a copy of this message | ||
In article <20020411130759.38268.qmail@pb1.pair.com>,
davidr@execulink.co.za says...
> Hi all,
>
> I have a textarea which will containg info from the user. This then
> needs to be parsed through something like htmlspecialchars() or
> htmlentities().
>
> The issue is that my system really needs to do the following:
>
> 1. Accept the info
> 2. Check if there is any HTML syntax (<p>, etc)
> 3. If YES: remove anything that might be harmful (eg FORM, etc)
> 4. If NO: Add replace CR/LF with <BR>
>
> The idea is that normal formatting such as <b>, <i>, <u>, <a href> is
> ok, but I do not want off illegal stuff. I want something a little like
> Slashdot's stuff.
>
> Easy?? anyone know anything about this?
>
> Thanks
>
> David R
Striptags()
--
David Robley
Temporary Kiwi!
Quod subigo farinam