Subject: | XML::Liberal::Remedy::LowAsciiChars uses $& |
diff -ur XML-Liberal-0.22/lib/XML/Liberal/Remedy/LowAsciiChars.pm XML-Liberal-0.22-
my/lib/XML/Liberal/Remedy/LowAsciiChars.pm
--- XML-Liberal-0.22/lib/XML/Liberal/Remedy/LowAsciiChars.pm 2009-03-17
21:08:11.000000000 +0300
+++ XML-Liberal-0.22-my/lib/XML/Liberal/Remedy/LowAsciiChars.pm 2010-07-10
04:58:14.000000000 +0400
@@ -6,9 +6,9 @@
sub apply {
my $self = shift;
my($xml_ref) = @_;
- my $match = $$xml_ref =~ s{&#(?:(\d+)|x([0-9A-Fa-f]{2,4}));}{
- ($1 && is_low_ascii($1)) || ($2 && is_low_ascii(hex($2)))
- ? '' : $&;
+ my $match = $$xml_ref =~ s{(&#(?:(\d+)|x([0-9A-Fa-f]{2,4}));)}{
+ ($2 && is_low_ascii($2)) || ($3 && is_low_ascii(hex($3)))
+ ? '' : $1;
}eg;
return 1 if $match;
--
Best regards, Ruslan.