1
package MyStripScripts;
4
use warnings FATAL => 'all';
6
use HTML::StripScripts::Parser();
7
our @ISA = qw(HTML::StripScripts::Parser);
10
### NOTE - When changing the values of any of these hashes, first copy the hash
11
### and THEN change the values. For instance:
13
### my %head = %{$Context{Head}};
14
### $head{meta} = 'EMPTY';
15
### $Context{Head} = \%head
17
### This will ensure that the original
18
### HTML::StripScripts will still work as expected.
20
our (%Context,%Attrib);
22
### Add <meta> and <link> tags to <head>
23
sub init_context_whitelist {
26
%Context = %{$self->SUPER::init_context_whitelist};
27
my %head = %{$Context{Head}};
28
$head{meta} = 'EMPTY';
29
$head{link} = 'EMPTY';
30
$Context{Head} = \%head;
35
### Add attributes for the <meta> and <link> tags
36
sub init_attrib_whitelist {
39
%Attrib = %{$self->SUPER::init_attrib_whitelist};
42
'http-equiv' => 'word',