1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Fix charset decoding in the PurePerl module (#405186)
Author: Niko Tyni <ntyni@iki.fi>
Date: Sun, 04 Nov 2007 20:46:58 +0200
--- a/lib/XML/SAX/PurePerl/Productions.pm
+++ b/lib/XML/SAX/PurePerl/Productions.pm
@@ -39,7 +39,7 @@
# can't do this one without unicode
# $CombiningChar = qr/^$/msx;
- $NameChar = qr/^ (?: $BaseChar | $Digit | [._:-] | $Extender )+ $/x;
+ $NameChar = qr/ (?: $BaseChar | $Digit | [._:-] | $Extender )+ /x;
PERL
die $@ if $@;
}
--- a/lib/XML/SAX/PurePerl.pm
+++ b/lib/XML/SAX/PurePerl.pm
@@ -677,7 +677,7 @@
return unless length($name);
- $name =~ /$NameChar/o or $self->parser_error("Name <$name> does not match NameChar production", $reader);
+ $name =~ /^$NameChar+$/o or $self->parser_error("Name <$name> does not match NameChar production", $reader);
return $name;
}
|