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