use Newslash::Model::EscapeHTML qw();
use HTML::Tidy;
-=head2 clean_html($html, \%allowed)
+=head2 clean_html(\%allowed, $html)
escape and tidy HTML
=cut
sub clean_html {
- my ($self, $html, $allowed) = @_;
- my $escaped = escape_html($allowed, $html);
+ my ($self, $allowed, $html) = @_;
+ my $escaped = $self->escape_html($allowed, $html);
$escaped = EscapeHTML::blank_line_to_paragraph($escaped);
my $tidy = HTML::Tidy->new( {
}
-=head2 escape_html($html, \%allowed)
+=head2 escape_html(\%allowed, $html)
escape HTML
=cut
sub escape_html {
- my ($self, $html, $allowed) = @_;
+ my ($self, $allowed, $html) = @_;
return EscapeHTML::escape_html($allowed, $html);
}