fix bug where html_unescape would try to unescape non-ascii numerics
[catagits/DOM-Tiny.git] / lib / DOM / Tiny / Entities.pm
index db25659..7b76fd4 100644 (file)
@@ -33,7 +33,7 @@ sub html_escape {
 
 sub html_unescape {
   my $str = shift;
-  $str =~ s/&(?:\#((?:\d{1,7}|x[0-9a-fA-F]{1,6}));|(\w+;))/_decode($1, $2)/ge;
+  $str =~ s/&(?:\#((?:[0-9]{1,7}|x[0-9a-fA-F]{1,6}));|(\w+;))/_decode($1, $2)/ge;
   return $str;
 }