Data::FormValidator::Filters::HTMLScrubber - Data::FormValidator filter that allows to scrub/sanitize html



NAME

Data::FormValidator::Filters::HTMLScrubber - Data::FormValidator filter that allows to scrub/sanitize html


SYNOPSIS

   use Data::FormValidator::Filters::HTMLScrubber qw(html_scrub);
   # Data::FormValidator Profile:
   my $dfv_profile = {
      required => [ qw/foo bar/ ],
      field_filters => {
         foo => [ 'trim', html_scrub( allow => [qw/b i em strong/] ) ]
      }
   };


DESCRIPTION

Data::FormValidator filter that allows to scrub/sanitize html in form field values.


API

This module exports following filters:

html_scrub( %options )

This will create a filter that will scrub/sanitize tha vaule of the field of the form that is being submitted.

The %options arguments are correspondant to the HTML::Scrubber manpage constructor arguments:

See the HTML::Scrubber manpage for detailed description.


TODO


BUGS

Please submit bugs to CPAN RT system at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-FormValidator-Filters-HTMLScrubber or by email at bug-data-formValidator-filters-htmlscrubber@rt.cpan.org

Patches are welcome and I'll update the module if any problems will be found.


VERSION

Version 0.02


SEE ALSO

the Data::FormValidator manpage, the HTML::Scrubber manpage


AUTHOR

Enrico Sorcinelli, <bepi@perl.it>


COPYRIGHT AND LICENSE

Copyright (C) 2006 by Enrico Sorcinelli

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.