Should users ever be allowed to post html?
I think it's a big security risk.
And if this is the case then why do most applications perform htmlspecialchars when printing the data? Why not just do this:
if($POST) // or get, cookie
{
1. check if gpc is off, if so addslashes
2. then perform htmlspecialchars(trim($POST))
}
This will eliminate the constant need of perfoming htmlspecialchars on every global that's about to be displayed.
And then of course perform stripslashes before printing.
It just seems to me that an application might run slightly faster this way( use htmlspecialchars only once ).