line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Stash::AutoEscaping::Escaped::HTML; |
2
|
3
|
|
|
3
|
|
2015
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
107
|
|
3
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
103
|
|
4
|
3
|
|
|
3
|
|
16
|
use base qw(Template::Stash::AutoEscaping::Escaped::Base); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub escape { |
7
|
11
|
|
|
11
|
1
|
20
|
my $class = shift; |
8
|
11
|
|
|
|
|
22
|
my $text = shift; |
9
|
11
|
|
|
|
|
32
|
for ($text) { |
10
|
11
|
|
|
|
|
33
|
s/&/&/g; |
11
|
11
|
|
|
|
|
53
|
s/</g; |
12
|
11
|
|
|
|
|
41
|
s/>/>/g; |
13
|
11
|
|
|
|
|
21
|
s/"/"/g; |
14
|
11
|
|
|
|
|
36
|
s/'/'/g; |
15
|
|
|
|
|
|
|
} |
16
|
11
|
|
|
|
|
39
|
return $text; |
17
|
|
|
|
|
|
|
# return $class->new($text, 1); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=encoding utf8 |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Template::Stash::AutoEscaping::Escaped::HTML - HTML escaping base class |
27
|
|
|
|
|
|
|
L. Internal use. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
See L . |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
For internal use. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head2 Methods |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 new |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Constructor. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 new_as_escaped |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Constructor. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 as_string |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Return the string. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 flag |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Flags |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 escape |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Abstract method. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 stop_callback |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Clear the callback. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 escape_manually |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Internal use. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 concat |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Stuff. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 LICENSE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
74
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
mala Ecpan@ma.laE (original author of L) |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Shlomi Fish (L) added some enhancements and |
81
|
|
|
|
|
|
|
fixes, while disclaiming all rights, as part of his work for |
82
|
|
|
|
|
|
|
L and released the result as |
83
|
|
|
|
|
|
|
C . |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SEE ALSO |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
L |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |