line |
true |
false |
branch |
136
|
0 |
6 |
if eval 'use Scalar::Readonly qw(readonly_on);' |
768
|
10 |
13 |
if $tags_to_callback |
769
|
0 |
23 |
if $attribs_to_callback |
771
|
1 |
22 |
if $Opts{'mismatched_tags_to_fix'} |
1081
|
0 |
301 |
if $Debug |
1083
|
0 |
301 |
if $Debug |
1100
|
0 |
301 |
if $HasScalarReadonly |
1131
|
1019 |
301 |
if ($I =~ /\G(.*?)
|
1138
|
208 |
811 |
$I =~ m[\G/]cogs ? : |
1141
|
991 |
28 |
if ($I =~ /\G($TagNameRE)/cogs) { } |
|
18 |
10 |
elsif ($I =~ /\G(!)((?:\[CDATA\[|(?:--)?\[if|--)?)/cgis) { } |
|
8 |
2 |
elsif ($I =~ /\G(\?)/cgs) { } |
1144
|
553 |
438 |
$I =~ m[\G([\s/]+)]cogs ? : |
1146
|
0 |
991 |
if $Debug |
1150
|
443 |
548 |
if $I =~ /\G>/cogs |
1156
|
548 |
1 |
unless defined $1 or defined $4 |
1159
|
663 |
6 |
if (defined $4 and $4 =~ /^([`"']?)(.*)\1$/s) |
1161
|
5 |
658 |
$1 eq '`' ? : |
1166
|
4 |
665 |
if $UTF8Input |
1167
|
4 |
665 |
if $UTF8Input |
1170
|
0 |
669 |
if $Debug |
1174
|
545 |
3 |
if ($I =~ m(\G(?:(\s*[/\\]*\s*(?:--)?\s*)?>|([\s/-]*)))cgs) |
1175
|
1 |
531 |
$2 ? : |
|
13 |
532 |
$1 ? : |
1184
|
262 |
729 |
if (ref $TagOps eq 'CODE') { } |
1186
|
0 |
262 |
if $Debug |
1191
|
0 |
729 |
if $Debug |
1195
|
0 |
991 |
unless defined pos $I |
1196
|
0 |
991 |
if $Debug |
1203
|
85 |
906 |
if $$Self{'fix_mismatched_tags'} and $Defang != 1 |
1207
|
155 |
836 |
if ($Defang != 0) |
1208
|
0 |
155 |
if $Debug |
1209
|
155 |
0 |
if $$Self{'allow_double_defang'} or substr($Tag, 0, length $$Self{'defang_string'}) ne $$Self{'defang_string'} |
1229
|
0 |
18 |
if $Debug |
1233
|
4 |
14 |
$IsCDATA ? : |
1238
|
4 |
14 |
if ($CommentDelim =~ /((?:--)?)\[if/) |
1240
|
1 |
3 |
if $ConditionalDelim eq '' |
1242
|
4 |
0 |
unless ($I =~ /\G[^\]]*\]-->/cgis) |
1247
|
0 |
18 |
if $Debug |
1255
|
15 |
3 |
if ($I =~ /\G(.*?)(\Q$ClosingCommentDelim\E!?\s*)(>)/cgis or $I =~ /\G(.*?)(--)(>)/cgis) { } |
1260
|
1 |
14 |
if ($EndRestartCommentsText and $CommentData =~ s/^(.*?)(>.*)$/$2/s) |
1269
|
15 |
0 |
if $CommentData |
1270
|
15 |
0 |
if $CommentData |
1273
|
1 |
14 |
$EndRestartCommentsText ? : |
1282
|
0 |
3 |
unless $I =~ /\G(.*)$/cgs |
1295
|
0 |
8 |
if $Debug |
1298
|
6 |
2 |
if ($I =~ /\G(.*?\??)>/cgs) { } |
1312
|
131 |
888 |
if (exists $$Self{'AppendOutput'}) |
1315
|
0 |
1019 |
if (exists $$Self{'DelayedAppendOutput'}) |
1322
|
0 |
301 |
if $Debug |
1325
|
292 |
9 |
if $1 |
1332
|
300 |
1 |
if ($$Self{'Reentrant'}-- <= 1) |
1337
|
2 |
299 |
if $UTF8Input |
1367
|
131 |
1 |
unless defined $$Self{'AppendOutput'} |
1373
|
0 |
0 |
unless defined $$Self{'DelayedAppendOutput'} |
1443
|
0 |
47 |
if $$Self{'Debug'} |
1445
|
24 |
23 |
unless ($IsEndTag) |
1449
|
21 |
3 |
if ($$HtmlR =~ m[\G(.*?)(?=
|
1451
|
0 |
21 |
if $$Self{'Debug'} |
1491
|
0 |
417 |
if $$Self{'Debug'} |
1494
|
107 |
310 |
if not $IsAttr and $IsEndTag |
1504
|
108 |
202 |
if (not $IsAttr) { } |
1505
|
107 |
1 |
if (m[\G(.*?)(?=
|
|
1 |
0 |
elsif (/\G([^<]*)/cgis) { } |
1516
|
202 |
0 |
defined $_ ? : |
1522
|
108 |
202 |
unless ($IsAttr) |
1523
|
2 |
106 |
$Content =~ s/^(\s*\s*)$// ? : |
1533
|
0 |
310 |
if $$Self{'Debug'} |
1536
|
134 |
176 |
$Naked ? : |
1544
|
134 |
379 |
if $Selector eq '' and $SelectorRule eq '' |
1547
|
0 |
379 |
if $$Self{'Debug'} |
1548
|
0 |
379 |
if $$Self{'Debug'} |
1562
|
379 |
0 |
if $Spaces |
1563
|
0 |
379 |
unless $ExtraData{$Selector} |
1564
|
0 |
0 |
unless $Spaces or $IsAttr |
1567
|
379 |
0 |
if (defined $Selector) |
1568
|
379 |
0 |
if defined $BeforeSelector |
1570
|
379 |
0 |
if defined $AfterSelector |
1571
|
379 |
0 |
if defined $OpenBrace |
1572
|
344 |
35 |
if defined $SelectorRule |
1573
|
379 |
0 |
if defined $CloseBrace |
1574
|
379 |
0 |
if defined $AfterRule |
1579
|
0 |
310 |
if $$Self{'Debug'} |
1581
|
202 |
108 |
if ($IsAttr) { } |
1586
|
1 |
107 |
unless $ClosingStyleTagPresent |
1621
|
0 |
31 |
if $V and $V > 127 |
1622
|
31 |
0 |
$V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344) ? : |
1628
|
108 |
202 |
unless ($_[1]) |
1632
|
1 |
125 |
if $V and $V > 127 |
1633
|
126 |
0 |
$V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344) ? : |
1635
|
0 |
1 |
unless $EntityToChar{lc $1} |
1646
|
1 |
309 |
if $UnicodeEntity |
1648
|
0 |
310 |
if $$Self{'Debug'} |
1703
|
0 |
379 |
if $$Self{'Debug'} |
1711
|
0 |
534 |
if $$Self{'Debug'} |
1717
|
11 |
523 |
if ($$Self{'url_callback'} and $Value =~ /\s*url\(\s*((?:['"])?)(.*?)\1\s*\)/i) |
1718
|
11 |
0 |
if $2 |
1719
|
0 |
11 |
if $$Self{'Debug'} |
1720
|
2 |
9 |
$IsAttr ? : |
1721
|
11 |
0 |
if $Url |
1723
|
0 |
11 |
if $$Self{'Debug'} |
1724
|
11 |
0 |
if $UrlOrig |
1729
|
0 |
534 |
if $$Self{'Debug'} |
1741
|
163 |
147 |
if $$Self{'css_callback'} |
1743
|
0 |
310 |
if $$Self{'Debug'} and $#Selectors > $#SelectorRules |
1760
|
57 |
480 |
unless $v |
1763
|
57 |
480 |
if ($k > 0 and not $v) |
1767
|
37 |
20 |
if defined $$PrevExtra[4] and not $$PrevExtra[4] =~ /;/ |
1781
|
99 |
280 |
if $$SelectorsIn[$Counter] and not $IsAttr |
1792
|
0 |
537 |
unless $v |
1793
|
0 |
537 |
unless $v |
1796
|
315 |
222 |
if ($Defang == 2) |
1797
|
313 |
2 |
$Value =~ m[^\s*[a-z0-9%!"'`:()#\s.,\/+-]+\s*;?\s*$]i ? : |
1798
|
23 |
292 |
$Value =~ /^\s*url\s*\(/i ? : |
1799
|
3 |
312 |
$Value =~ /^\s*expression\s*\(/i ? : |
1802
|
4011 |
285 |
defined $_ ? : |
1807
|
107 |
430 |
$Defang != 0 ? : |
1808
|
107 |
430 |
$Defang != 0 ? : |
1811
|
537 |
0 |
if (defined $Key) |
1815
|
0 |
537 |
if $$Self{'Debug'} |
1858
|
0 |
644 |
if $Debug |
1862
|
0 |
644 |
if $Debug |
1865
|
572 |
72 |
if (ref $Tags{$lcTag}) |
1871
|
457 |
187 |
unless $AttribRule |
1872
|
0 |
644 |
if $Debug |
1875
|
6 |
10 |
if ($$Self{'url_callback'} and $AttribRule and exists $UrlRules{$AttribRule}) |
1876
|
0 |
6 |
if $Debug |
1878
|
0 |
6 |
unless defined pos $$HtmlR |
1882
|
202 |
442 |
if ($lcAttrKey eq 'style') |
1883
|
0 |
202 |
if $Debug |
1888
|
0 |
644 |
if ($$Self{'attribs_callback'} and exists $$Self{'attribs_to_callback'}{$lcAttrKey}) |
1889
|
0 |
0 |
if $Debug |
1892
|
0 |
0 |
if $DefangAttrib != 1 |
1895
|
423 |
221 |
if ($DefangAttrib == 2 and $AttribRule) { } |
|
215 |
6 |
elsif (not $AttribRule) { } |
1897
|
0 |
423 |
if $Debug |
1900
|
345 |
78 |
if (ref $Rule eq 'Regexp') |
1901
|
306 |
39 |
$AttrValStripped =~ /$Rule/ ? : |
1905
|
78 |
345 |
if (ref $Rule eq 'ARRAY') |
1906
|
72 |
6 |
$AttrValStripped =~ /$$Rule[0]/ ? : |
1913
|
0 |
644 |
if $Debug |
1916
|
328 |
316 |
if $DefangAttrib != 0 |
1923
|
95 |
634 |
if (exists $$Self{'tags_to_callback'}{$lcTag}) |
1924
|
0 |
95 |
if $Debug |
1935
|
20 |
624 |
unless ($AttributeHash{$lcAttr}) |
1936
|
0 |
20 |
if $Debug |
1942
|
318 |
0 |
if defined $$Attr[7] and $$Attr[7] != 0 and $$Self{'allow_double_defang'} || substr($$Attr[0] || '', 0, length $$Self{'defang_string'}) ne $$Self{'defang_string'} |
1957
|
621 |
3 |
if defined $$Attr[4] |
1971
|
28 |
1 |
if (defined $$Attr[4]) { } |
1983
|
599 |
130 |
if ($DefangTag == 2 and my $TagOps = $Tags{$lcTag}) |
2000
|
57 |
27 |
if ($BlockTags{$lcTag}) |
2009
|
48 |
36 |
if (@$OpenedTags) |
2013
|
40 |
8 |
if (not $IsEndTag or $lcTag ne $LastTag) |
2016
|
15 |
25 |
if (my $ImplicitTags = $ImplicitOpenTags{$LastTag}) |
2024
|
1 |
5 |
if not $IsEndTag and $Tag eq $lcTag |
2035
|
13 |
71 |
if ($IsEndTag and $IsTagToFix) |
2039
|
1 |
12 |
unless $$OpenedTagsCount{$lcTag} |
2045
|
11 |
8 |
if ($PreviousOpenedTag eq $lcTag) |
2051
|
2 |
6 |
if (my $NestList = $MismatchedTagNest{$PreviousOpenedTag}) |
2052
|
0 |
2 |
if $$NestList{''} or $$NestList{$lcTag} |
2061
|
11 |
1 |
if ($Found) { } |
2074
|
41 |
41 |
if (not $IsEndTag and $IsTagToFix) |
2080
|
56 |
26 |
if ($BlockTags{$lcTag}) |
2082
|
19 |
37 |
unless ($$HtmlR =~ m[\G(?=\s*?($TagNameRE))]cg and $BlockTags{lc "$1"}) |
2087
|
2 |
0 |
if ($SpanCount < 3) |
2092
|
2 |
0 |
$$POTD[0] eq 'span' && $$POTD[1] eq $SpanAttrs ? : |
2105
|
10 |
7 |
if ($IsEndTag) { } |
2106
|
10 |
0 |
if ($lcTag eq $$Self{'opened_tags'}[-1][0]) { } |
2133
|
0 |
300 |
if ($$Self{'Debug'}) |
2135
|
0 |
0 |
if grep {$_ > 0;} values %$OpenedTagsCount |
2166
|
3 |
641 |
unless defined $AttrVal |
2177
|
1 |
134 |
if $V and $V > 127 |
2178
|
135 |
0 |
$V && $V < 1114111 && $V != 65535 && !($V > 55295 && $V < 57344) ? : |
2182
|
0 |
12 |
unless $EntityToChar{lc $1} |
2188
|
0 |
0 |
defined $1 && hex $1 < 1114111 && hex $1 != 65535 && !(hex $1 > 55295 && hex $1 < 57344) ? : |
2199
|
1 |
640 |
if $UnicodeEntity |
2201
|
0 |
641 |
if $$Self{'Debug'} |
2211
|
0 |
0 |
unless ($Charset) |
2220
|
0 |
0 |
unless defined $1 or defined $4 |
2225
|
0 |
0 |
if ($Attrs{'content'}) |
2226
|
0 |
0 |
$Attrs{'content'} =~ /charset\s*=\s*([^\s;'"`]+)[\s;'"`]*/i ? : |
2232
|
0 |
0 |
$Charset ? : |