Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Sanitizing HTML

by pingo (Hermit)
on Sep 29, 2004 at 15:54 UTC ( #395030=note: print w/replies, xml ) Need Help??


in reply to Sanitizing HTML

I would suggest you take a look at HTML::TreeBuilder. It does a fine job of fixing broken HTML, and it is quite easy to remove tags that you do not want to allow (using find()).

If the HTML is just a snippet (not a complete document with html and body tags), it will add the necessary tags, but one can always use disembowel() to get rid of that. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://395030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2021-01-25 20:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?