Condition Coverage

blib/lib/HTML/Defang.pm
Criterion Covered Total %
condition 94 156 60.2


and 3 conditions

line !l l&&!r l&&r condition
865 0 0 0 $lcTag eq 'title' and not $IsEndTag
1252 9 0 668 defined $4 and $4 =~ /^([`"']?)(.*)\1$/s
1278 95 647 271 not exists $Self->{'tags_to_callback'}{$lcTag} and ref $TagOps eq 'CODE'
1297 919 3 91 $Self->{'fix_mismatched_tags'} and $Defang == 0
1658 701 2 2 @InMedia and $Content =~ /\G(\s*)(\})(\s*)/cgs
0 179 2 not $Naked and $Content =~ /\G\s*$StyleSelectors\s*$/cgs
0 179 0 not $Naked and $Content =~ m[\G(?:\{\}]*)?>\s*)+]cgs
1670 253 132 137 $Selector eq '' and $SelectorRule =~ /^[;\s]*$/
1751 0 31 0 $V and $V > 127
1752 0 0 31 $V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344)
1762 0 125 1 $V and $V > 127
1763 0 0 126 $V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344)
1879 316 0 0 $Self->{'Debug'} and $#Selectors > $#SelectorRules
1901 54 37 164 defined $v->[4] and $v->[4] =~ /;/
1914 134 150 105 $SelectorsIn->[$Counter] and not $IsAttr
2032 638 0 16 $Self->{'url_callback'} and $AttribRule
638 10 6 $Self->{'url_callback'} and $AttribRule and exists $UrlRules{$AttribRule}
2045 654 0 0 $Self->{'attribs_callback'} and exists $Self->{'attribs_to_callback'}{$lcAttrKey}
2118 55 78 831 $DefangTag == 2 and my $TagOps = $Tags{$lcTag}
2122 964 0 0 defined $DefangTagUrlOverride and $DefangTagUrlOverride == 1
2124 964 0 0 defined $DefangTagAttrOverride and $DefangTagAttrOverride == 1
2139 6 214 434 $DefangAttrib == 2 and $AttribRule
6 0 214 not $AttribRule and $DefangAttrib != 0
2177 2 17 6 $ImplicitTags and !$ImplicitTags->{$LastTag} || $IsEndTag
2180 2 3 1 not $IsEndTag and $Tag eq $lcTag
2194 33 66 33 $BlockTags{$lcTag} and not $TableTags{$lcTag}
2198 7 26 3 @$OpenedTags and $InlineTags{$OpenedTags->[-1][0]}
2216 2 0 1 $$HtmlR =~ m[\G(?=\s*
2 1 0 $$HtmlR =~ m[\G(?=\s*
2227 1 0 2 $POTD->[0] eq 'span' && $POTD->[1] eq $SpanAttrs
2262 3 48 9 @$OpenedTags and $OpenedTags->[-1][0] ne $lcTag
2304 4 52 0 $IsTagToFix and $Self->{'empty_tags_to_collapse'}{$lcTag}
2311 0 0 0 $$OutR =~ /\G\s*(?:<|$)/cg and $LastTagPos > 0
2400 0 135 1 $V and $V > 127
2401 0 0 136 $V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344)
2420 0 0 0 defined $1 && hex $1 < 1114111 && hex $1 != 65535 && !(hex $1 > 55295 && hex $1 < 57344)

or 2 conditions

line l !l condition
1750 31 0 defined $1 && hex $1 || undef
1761 125 0 defined $1 && hex $1 || defined $2 && int $2 || undef
1894 494 111 $$ExtraData{lc $Key} ||= []
2079 320 0 $Attr->[0] || ''
320 0 $Attr->[0] || ''
2399 61 0 defined $1 && hex $1 || defined $2 && int $2 || undef

or 3 conditions

line l !l&&r !l&&!r condition
791 0 23 0 ref $Proto || $Proto
1249 676 1 552 defined $1 or defined $4
1313 0 158 0 $Self->{'allow_double_defang'} or not $Tag =~ /$Self->{'defang_re'}/
1345 18 0 3 $I =~ /\G(.*?)(\Q$ClosingCommentDelim\E!?\s*)(>)/cgis or $I =~ /\G(.*?)(--)(>)/cgis
1658 0 0 179 $Content =~ /\G[^\s<]+/cgs or $Content =~ /\G<+/cgs
1704 389 0 0 $Spaces or $IsAttr
2028 188 252 214 $AttribRule ||= $CommonAttributes{$lcAttrKey}
2079 0 320 0 $Self->{'allow_double_defang'} or not +($Attr->[0] || '') =~ /$Self->{'defang_re'}/
2088 634 0 0 $QuoteRe{$Attr->[3]} || $QuoteRe{''}
2177 6 0 17 !$ImplicitTags->{$LastTag} || $IsEndTag
2288 0 0 0 $NestList->{''} or $NestList->{$lcTag}
2447 0 0 0 defined $1 or defined $4