HTML::Restrict

Strip unwanted HTML tags and attributes
Download

HTML::Restrict Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Olaf Alders
  • Publisher web site:
  • http://search.cpan.org/~oalders/

HTML::Restrict Tags


HTML::Restrict Description

HTML::Restrict is a Perl module that uses HTML::Parser to strip HTML from text in a restrictive manner. By default all HTML is restricted. You may alter the default behaviour by supplying your own tag rules.SYNOPSIS use HTML::Restrict; my $hr = HTML::Restrict->new(); # use default rules to start with (strip away all HTML) my $processed = $hr->process(' < b >i am bold< /b > '); # $processed now equals: 'i am bold' # Now, a less restrictive example: use HTML::Restrict; my $hr = HTML::Restrict->new(); $hr->set_rules({ b => [], img => }); my $html = q; my $processed = $hr->process( $html ); # $processed now equals: < b >hello< /b > < img src="pic.jpg" alt="me" / >Product's homepage


HTML::Restrict Related Software