HTML::SanitizerHTML::Sanitizer is a HTML Sanitizer. | |
Download |
HTML::Sanitizer Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- David Nesting
- Publisher web site:
- http://search.cpan.org/~kwittmer/THD7-1.3/THD7.pm
HTML::Sanitizer Tags
HTML::Sanitizer Description
HTML::Sanitizer is a HTML Sanitizer. HTML::Sanitizer is a HTML Sanitizer.SYNOPSIS my $safe = new HTML::Sanitizer; $safe->permit_only( qw/ strong em /, a => { href => qr/^(?:http|ftp):/, title => 1, }, img => { src => qr/^(?:http|ftp):/, alt => 1, }, b => HTML::Element->new('strong'), ); $sanitized = $safe->filter_html_fragment($evil_html); # or my $tree = HTML::TreeBuilder->new->parse_file($filename); $safe->sanitize_tree($tree);ABSTRACTThis module acts as a filter for HTML. It is not a validator, though it might be possible to write a validator-like tool with it. It's intended to strip out unwanted HTML elements and attributes and leave you with non-dangerous HTML code that you should be able to trust. Requirements: · Perl
HTML::Sanitizer Related Software