Branch Coverage

blib/lib/HTML/Detoxifier.pm
Criterion Covered Total %
branch 0 74 0.0


line true false branch
414 0 0 if (not exists $opts{'section'} or $opts{'section'} eq 'first')
420 0 0 if ($opts{'allow_only'}) { }
0 0 elsif ($opts{'disallow'}) { }
432 0 0 if exists {aesthetic => undef, block => undef, images => undef, layout => undef, size-changing => undef}->{$restriction}
436 0 0 if ($$token[0] eq 'S') { }
0 0 elsif ($$token[0] eq 'E') { }
0 0 elsif ($$token[0] eq 'T') { }
0 0 elsif ($$token[0] eq 'C') { }
437 0 0 if exists $opts{'disallow'}{'everything'}
438 0 0 unless exists {a => undef, abbr => undef, acronym => undef, address => undef, applet => undef, area => undef, b => undef, base => undef, basefont => undef, bdo => undef, big => undef, blink => undef, blockquote => undef, body => undef, br => undef, button => undef, caption => undef, cite => undef, code => undef, col => undef, colgroup => undef, dd => undef, del => undef, dfn => undef, div => undef, dl => undef, dt => undef, em => undef, embed => undef, fieldset => undef, form => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, head => undef, hr => undef, html => undef, i => undef, img => undef, input => undef, ins => undef, kbd => undef, label => undef, legend => undef, li => undef, link => undef, map => undef, marquee => undef, meta => undef, noscript => undef, object => undef, ol => undef, optgroup => undef, option => undef, p => undef, param => undef, pre => undef, q => undef, s => undef, samp => undef, script => undef, select => undef, small => undef, span => undef, strike => undef, strong => undef, style => undef, sub => undef, sup => undef, table => undef, tbody => undef, td => undef, textarea => undef, tfoot => undef, th => undef, thead => undef, title => undef, tr => undef, tt => undef, u => undef, ul => undef, var => undef}->{lc $$token[1]}
442 0 0 if exists {aesthetic => {b => undef, basefont => undef, big => undef, blink => undef, em => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, i => undef, kbd => undef, marquee => undef, pre => undef, s => undef, small => undef, strike => undef, strong => undef, style => undef, sub => undef, sup => undef, tt => undef, u => undef, var => undef}, annoying => {blink => undef, marquee => undef}, block => {blockquote => undef, br => undef, code => undef, div => undef, dl => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, hr => undef, li => undef, marquee => undef, ol => undef, p => undef, pre => undef, q => undef, samp => undef, style => undef, ul => undef}, document => {base => undef, basefont => undef, bdo => undef, body => undef, head => undef, html => undef, link => undef, meta => undef, style => undef, title => undef}, dynamic => {applet => undef, embed => undef, noscript => undef, object => undef, param => undef, script => undef}, forms => {button => undef, fieldset => undef, form => undef, input => undef, label => undef, legend => undef, optgroup => undef, option => undef, select => undef, textarea => undef}, images => {img => undef, map => undef, style => undef}, layout => {caption => undef, col => undef, colgroup => undef, style => undef, table => undef, tbody => undef, td => undef, tfoot => undef, th => undef, thead => undef, tr => undef}, links => {a => undef, area => undef, link => undef, map => undef}, misc => {abbr => undef, cite => undef, dd => undef, del => undef, dfn => undef, dt => undef, span => undef}, size-changing => {big => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, small => undef, style => undef, sub => undef, sup => undef}}->{$restriction}{lc $$token[1]}
447 0 0 unless $key =~ /^[a-z]/i
449 0 0 if (exists $opts{'disallow'}{'dynamic'})
450 0 0 if $key =~ /^on/is
451 0 0 if lc $key eq 'href' and $value =~ /^[a-z]+?script:/is
460 0 0 if lc $$token[1] eq 'link' and exists $attrs{'rel'} && lc $attrs{'rel'} =~ /^\s*style\s*sheet\s*$/is || exists $attrs{'type'} && lc $attrs{'type'} =~ m[^\s*text/css\s*$]
468 0 0 if lc $$token[1] eq 'style' and exists $opts{'disallow'}{'dynamic'}
472 0 0 if lc $$token[1] eq 'img' and $attrs{'src'} and not $attrs{'alt'}
477 0 0 if (not $styles_allowed) { }
0 0 elsif (exists $opts{'disallow'}{'dynamic'}) { }
478 0 0 if exists $attrs{'style'}
479 0 0 if exists $attrs{'class'}
480 0 0 if exists $attrs{'id'}
482 0 0 if $attrs{'style'}
486 0 0 if (lc $$token[1] eq 'html')
496 0 0 unless $attrs{'xmlns'}
498 0 0 unless $attrs{'lang'}
507 0 0 if (exists {area => undef, base => undef, basefont => undef, br => undef, col => undef, frame => undef, hr => undef, img => undef, input => undef, isindex => undef, link => undef, meta => undef, param => undef}->{lc $$token[1]}) { }
514 0 0 unless exists {a => undef, abbr => undef, acronym => undef, address => undef, applet => undef, area => undef, b => undef, base => undef, basefont => undef, bdo => undef, big => undef, blink => undef, blockquote => undef, body => undef, br => undef, button => undef, caption => undef, cite => undef, code => undef, col => undef, colgroup => undef, dd => undef, del => undef, dfn => undef, div => undef, dl => undef, dt => undef, em => undef, embed => undef, fieldset => undef, form => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, head => undef, hr => undef, html => undef, i => undef, img => undef, input => undef, ins => undef, kbd => undef, label => undef, legend => undef, li => undef, link => undef, map => undef, marquee => undef, meta => undef, noscript => undef, object => undef, ol => undef, optgroup => undef, option => undef, p => undef, param => undef, pre => undef, q => undef, s => undef, samp => undef, script => undef, select => undef, small => undef, span => undef, strike => undef, strong => undef, style => undef, sub => undef, sup => undef, table => undef, tbody => undef, td => undef, textarea => undef, tfoot => undef, th => undef, thead => undef, title => undef, tr => undef, tt => undef, u => undef, ul => undef, var => undef}->{lc $$token[1]}
517 0 0 if exists {aesthetic => {b => undef, basefont => undef, big => undef, blink => undef, em => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, i => undef, kbd => undef, marquee => undef, pre => undef, s => undef, small => undef, strike => undef, strong => undef, style => undef, sub => undef, sup => undef, tt => undef, u => undef, var => undef}, annoying => {blink => undef, marquee => undef}, block => {blockquote => undef, br => undef, code => undef, div => undef, dl => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, hr => undef, li => undef, marquee => undef, ol => undef, p => undef, pre => undef, q => undef, samp => undef, style => undef, ul => undef}, document => {base => undef, basefont => undef, bdo => undef, body => undef, head => undef, html => undef, link => undef, meta => undef, style => undef, title => undef}, dynamic => {applet => undef, embed => undef, noscript => undef, object => undef, param => undef, script => undef}, forms => {button => undef, fieldset => undef, form => undef, input => undef, label => undef, legend => undef, optgroup => undef, option => undef, select => undef, textarea => undef}, images => {img => undef, map => undef, style => undef}, layout => {caption => undef, col => undef, colgroup => undef, style => undef, table => undef, tbody => undef, td => undef, tfoot => undef, th => undef, thead => undef, tr => undef}, links => {a => undef, area => undef, link => undef, map => undef}, misc => {abbr => undef, cite => undef, dd => undef, del => undef, dfn => undef, dt => undef, span => undef}, size-changing => {big => undef, h1 => undef, h2 => undef, h3 => undef, h4 => undef, h5 => undef, h6 => undef, small => undef, style => undef, sub => undef, sup => undef}}->{$restriction}{lc $$token[1]}
523 0 0 if $tag eq lc $$token[1]
526 0 0 if lc $$token[1] eq 'style' and exists $opts{'disallow'}{'dynamic'}
530 0 0 if $checkcss
535 0 0 if $checkcss
539 0 0 unless exists $opts{'disallow'}{'comments'} or exists $opts{'disallow'}{'everything'}
544 0 0 if (not exists $opts{'section'} or $opts{'section'} eq 'last')
549 0 0 @oldtagstacks ? :