Hi all,
I just realized Data::FormValidator::Filters::HTMLScrubber, a simple DFV
filter that allows to scrub/sanitize html in form field values.
It's available for evaluating and testing at:
http://modperl.it/Data-FormValidator-Filters-HTMLScrubber-0.02.tar.gz
http://modperl.it/Apache-Session-Memcached-0.01.tar.gz
I've attached a temporary POD at the end of the message.
I searched on CPAN and I've not found any similar module (the reason why I wrote
it). Also I searched over Data::FormVAlidator mailing list archives with same
result.
Since I would put it on CPAN, any suggestions about the module and/or namespace
are welcome.
Thanks in advance
by
- Enrico
---
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 HTML::Scrubber constructor
arguments:
* default
* allow
* deny
* rules
* process
* comment
See HTML::Scrubber for detailed description.
SEE ALSO
Data::FormValidator, HTML::Scrubber
AUTHOR
Enrico Sorcinelli, [EMAIL PROTECTED]
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.