line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::Liberal::Remedy::NestedCDATA; |
2
|
5
|
|
|
5
|
|
1998
|
use strict; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
123
|
|
3
|
|
|
|
|
|
|
|
4
|
5
|
|
|
5
|
|
1759
|
use HTML::Entities qw( encode_entities ); |
|
5
|
|
|
|
|
21832
|
|
|
5
|
|
|
|
|
1014
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub apply { |
7
|
96
|
|
|
96
|
0
|
142
|
my $class = shift; |
8
|
96
|
|
|
|
|
180
|
my($driver, $error, $xml_ref) = @_; |
9
|
|
|
|
|
|
|
|
10
|
96
|
100
|
|
|
|
211
|
return 0 if $error->message !~ /^parser error : Opening and ending tag mismatch:/; |
11
|
|
|
|
|
|
|
|
12
|
21
|
|
|
|
|
461
|
while ($$xml_ref =~ /(?<= )/xmsg) { |
13
|
5
|
|
|
|
|
28
|
my ($cdata, $start, $end) = ($1, $-[1], $+[1]); |
14
|
5
|
50
|
|
|
|
22
|
next if $cdata !~ /
|
15
|
5
|
|
|
|
|
18
|
my $escaped = encode_entities($cdata, '<>&'); |
16
|
5
|
|
|
|
|
1116
|
substr($$xml_ref, $start, $end - $start) = "]]>$escaped
|
17
|
5
|
|
|
|
|
19
|
return 1; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
16
|
|
|
|
|
45
|
return 0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |