hankknight
asked on
htmlentities() does NOT work with html entities
Hello,
I need to clean user-inputed text so I use htmlentities() however it does NOT work if html entities have already been provided.
Here is an example:
echo htmlentities("Copyright © 2007 CompanyName®");
How should I solve this?
I need to clean user-inputed text so I use htmlentities() however it does NOT work if html entities have already been provided.
Here is an example:
echo htmlentities("Copyright © 2007 CompanyName®");
How should I solve this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try using the PHP strip_tags method:
http://uk3.php.net/strip-tags