HTML Character Parsing

From: Date: Thu, 11 Apr 2002 13:07:55 +0000
Subject: HTML Character Parsing
Groups: php.general 
Request: Send a blank email to php-general+get-92563@lists.php.net to get a copy of this message
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

« previous php.general (#92563) next »