line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Lint::Pluggable::TinyEntitesEscapeRule; |
2
|
1
|
|
|
1
|
|
585
|
use 5.008_001; |
|
1
|
|
|
|
|
4
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use parent qw/ HTML::Lint::Pluggable::WhiteList /; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
52
|
use HTML::Entities qw/%char2entity/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
196
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
12
|
2
|
|
|
2
|
0
|
5
|
my($class, $lint) = @_; |
13
|
|
|
|
|
|
|
$class->SUPER::init($lint => +{ |
14
|
|
|
|
|
|
|
rule => +{ |
15
|
|
|
|
|
|
|
'text-use-entity' => sub { |
16
|
8
|
|
|
8
|
|
10
|
my $param = shift; |
17
|
8
|
100
|
|
|
|
20
|
return 0 if exists $char2entity{$param->{char}}; |
18
|
6
|
|
|
|
|
20
|
return 1; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
2
|
|
|
|
|
19
|
}); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |