HTML-StripScripts
view release on metacpan or search on metacpan
t/30subclass.t view on Meta::CPAN
use base qw(HTML::StripScripts);
sub reject_declaration {
my ($self, $text) = @_;
$self->output_declaration('<! FOO >');
}
}
$f = SubClass_reject_declaration->new;
$f->input_start_document;
$f->input_declaration('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
$f->input_text('foo');
$f->input_end_document;
is( $f->filtered_document, '<! FOO >foo', 'subclass reject_decalaration' );
=item reject_comment
Overriding reject_comment() so that rejected HTML comments are replaced
with custom text.
( run in 1.935 second using v1.01-cache-2.11-cpan-49f99fa48dc )