There has got to be a better way to do this (Input Handling/Tag stripping) |
[eluser]plainas[/eluser]
I would use htmlspecialchars() instead. If you use UTF-8 there's no need for htmlentities() as all those entities are already avialable in Unicode's UTF-8. If you run a string through htmlspecialchars() you can safely display it. All < > and / will be parsed into their entity so you're sure no html is parsed by the browser. But it sounds to me that you're looking for something like this instead: http://se2.php.net/strip-tags Also, since you're passing a lot of functions through the same function the array_map() function might come in http://se2.php.net/array_map remember you can pipe any php function that accepts one argument throug your validation class. Check the manual where it shows how to prep data: http://ellislab.com/codeigniter/user-gui...ation.html |
Messages In This Thread |
There has got to be a better way to do this (Input Handling/Tag stripping) - by El Forum - 08-29-2008, 08:11 PM
There has got to be a better way to do this (Input Handling/Tag stripping) - by El Forum - 08-29-2008, 09:29 PM
There has got to be a better way to do this (Input Handling/Tag stripping) - by El Forum - 09-08-2008, 03:44 AM
|