in reply to Re: Stripping the contents of Javascript tags
in thread Stripping the contents of Javascript tags
This won't handle any javascript event handlers, for that you would need to go through the attributes of each tag and remove the event handlers.use HTML::Parser; my $parser = HTML::Parser->new( api_version => 3, default_h => [sub { print $_[0] unless lc $_[1] eq 'script' }, 'te +xt,tagname'], comment_h=> [""], ); $parser->parse_file($file);
|
|---|