Thread: HTML tags
View Single Post
Old 02-02-2008, 02:28 PM   #1 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default HTML tags

I'm about to start writing a class for performing HTML cleanup and perhaps validation. Before doing that, however, I'd like to know if there is already some PHP extension that could do that. It would be easier, as well as faster. If not, could you perhaps give me some advice on the implementation? I mean, replacing ALL tags would be a relatively easy task. But how about removing all tags that are not in a set of allowed tags?

PS: please don't give me the strip_tags function. I know it's there, but I'd rather not use it. It has its flaws, I've experienced some with it and I've seen others have problems with it.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote