Data::FormValidator::Filters::HTMLScrubber - Data::FormValidator filter that allows to scrub/sanitize html
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/] ) ] } };
Data::FormValidator filter that allows to scrub/sanitize html in form field values.
This module exports following filters:
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.
Add more tests using Test::FormValidator suite
Add a constraint method/closure in order to test presence of HTML tags in a form field
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 0.02
the Data::FormValidator manpage, the HTML::Scrubber manpage
Enrico Sorcinelli, <bepi@perl.it>
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.