Browse Source

* XML::Feed/XML::Parser hardly fails on 'undefined entity'

master
Alex 'AdUser' Z 9 years ago
parent
commit
b051c70fc2
  1. 1
      Makefile.PL
  2. 4
      twatch-lite

1
Makefile.PL

@ -12,5 +12,6 @@ WriteMakefile(
'XML::Feed' => 0,
'YAML::Any' => 0,
'Getopt::Long' => 0,
'Html::Parser' => 0,
},
);

4
twatch-lite

@ -9,6 +9,7 @@ use Getopt::Long;
use YAML::Any qw(LoadFile);
use LWP::UserAgent;
use XML::Feed;
use HTML::Entities;
##### variables
our $VERSION = '0.02';
@ -111,7 +112,8 @@ sub process_feed {
return $urls;
}
my $feed = XML::Feed->parse(\$resp->decoded_content);
my $data = decode_entities($resp->decoded_content);
my $feed = XML::Feed->parse(\$data);
unless ($feed) {
_log(error => "Can't parse feed: " . XML::Feed->errstr);
return $urls;

Loading…
Cancel
Save