line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#my %XML_ESCAPE_MAP = ( |
2
|
|
|
|
|
|
|
# '&' => '&', |
3
|
|
|
|
|
|
|
# '<' => '<', |
4
|
|
|
|
|
|
|
# '>' => '>', |
5
|
|
|
|
|
|
|
# '"' => '"', |
6
|
|
|
|
|
|
|
# ''' => '\'', |
7
|
|
|
|
|
|
|
# ''' => '\'', |
8
|
|
|
|
|
|
|
# ' ' => ' ', |
9
|
|
|
|
|
|
|
# '\' => "\\", |
10
|
|
|
|
|
|
|
#); |
11
|
1
|
|
|
1
|
|
8
|
use Encode (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
12
|
1
|
|
|
1
|
|
6
|
use Mojo::Util qw(); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
103
|
|
13
|
|
|
|
|
|
|
sub Mojo::Webqq::xmlescape_parse { |
14
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
15
|
0
|
|
|
|
|
|
my $data = shift; |
16
|
0
|
0
|
|
|
|
|
return $data if not defined $data; |
17
|
0
|
|
|
|
|
|
$data=~s/ / /g; |
18
|
0
|
|
|
|
|
|
my $unicode_data = Mojo::Util::html_unescape(Encode::decode("utf8",$data)); |
19
|
|
|
|
|
|
|
#my $newdata = Mojo::Util::html_unescape($data); |
20
|
|
|
|
|
|
|
#eval { |
21
|
|
|
|
|
|
|
# if ($data =~ /\&/ or $newdata =~ /[><&]/) { |
22
|
|
|
|
|
|
|
# $newdata = Encode::decode('utf8', $newdata); |
23
|
|
|
|
|
|
|
# Encode::_utf8_off($newdata); |
24
|
|
|
|
|
|
|
# } |
25
|
|
|
|
|
|
|
#}; |
26
|
|
|
|
|
|
|
#return $newdata; |
27
|
|
|
|
|
|
|
#return $data; |
28
|
0
|
|
|
|
|
|
return Encode::encode("utf8",$unicode_data); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
1; |