sub create {
my ($class, %params) = @_;
- $params{allowed_tags} //= { map { ($_ => ['/']) } qw(b strong i em u ul ol li sub sup s strike br p div) };
+ $params{allowed_tags} //= { map { ($_ => ['/']) } qw(b strong i em u ul ol li sub sup s strike br p div table caption thead tbody tr th td) };
return HTML::Restrict->new(rules => $params{allowed_tags});
}
my $cleaner = SL::HTML::Restrict->create;
my $cleaned = $cleaner->process($unsafe_html);
-=head1
+=head1 DESCRIPTION
Often you want to allow a fixed set of well-known HTML tags to be used
– but nothing else. This is a thin wrapper providing a default set of