summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrhimport-fw5
-rwxr-xr-xrhimport-ra7
-rwxr-xr-xrhimport-rs5
3 files changed, 10 insertions, 7 deletions
diff --git a/rhimport-fw b/rhimport-fw
index 009a137..f8c6694 100755
--- a/rhimport-fw
+++ b/rhimport-fw
@@ -31,6 +31,7 @@ use XML::Feed::Enclosure;
use File::Fetch;
use IO::Handle;
use IPC::Open3;
+use HTML::Entities;
use lib '/usr/local/share/rhimport/';
use rhimport;
@@ -98,8 +99,8 @@ for my $entry ($feed->entries) {
if($entry->enclosure && $entry->enclosure->type eq "audio/mpeg") {
next unless $entry->enclosure->url =~ /$regexp/;
- my $sum_title = $entry->title;
- my $sum_text = $entry->content->body;
+ my $sum_title = decode_entities($entry->title);
+ my $sum_text = decode_entities($entry->content->body);
my $ff = File::Fetch->new(uri => $entry->enclosure->url);
my $current_file = `cat $STAT_FILE`;
diff --git a/rhimport-ra b/rhimport-ra
index f363c15..baac2c9 100755
--- a/rhimport-ra
+++ b/rhimport-ra
@@ -31,6 +31,7 @@ use XML::Feed::Enclosure;
use File::Fetch;
use IO::Handle;
use IPC::Open3;
+use HTML::Entities;
use lib '/usr/local/share/rhimport/';
use rhimport;
@@ -88,14 +89,14 @@ print " -> $RSS_URL\n";
my $feed = XML::Feed->parse(URI->new($RSS_URL))
or die "Error fetching feed: " . XML::Feed->errstr;
-my $bdexp = sprintf("^(\\d+)\\..*,\\s*0?%d\\s*\\.\\s*0?%d\\s*\\.\\s*%4d", $broadcast_day[2], $broadcast_day[1], $broadcast_day[0]);
+my $bdexp = sprintf("^(\\d+)\\..*\\s*0?%d\\s*\\.\\s*0?%d\\s*\\.\\s*%4d", $broadcast_day[2], $broadcast_day[1], $broadcast_day[0]);
my $file = "";
my $out_file = "";
for my $entry ($feed->entries) {
if($entry->enclosure && $entry->enclosure->type eq "audio/mpeg") {
- my $sum_title = $entry->title;
- my $sum_text = $entry->content->body;
+ my $sum_title = decode_entities($entry->title);
+ my $sum_text = decode_entities($entry->content->body);
next unless $sum_title =~ /$bdexp/;
my $bnum = $1;
diff --git a/rhimport-rs b/rhimport-rs
index 099b30b..fc9454a 100755
--- a/rhimport-rs
+++ b/rhimport-rs
@@ -31,6 +31,7 @@ use XML::Feed::Enclosure;
use File::Fetch;
use IO::Handle;
use IPC::Open3;
+use HTML::Entities;
use lib '/usr/local/share/rhimport/';
use rhimport;
@@ -111,8 +112,8 @@ while(1) {
my $ff = File::Fetch->new(uri => $entry->enclosure->url);
next unless (uc($ff->output_file) =~ $bdfile); # file not from correct day
- my $sum_title = $entry->title;
- my $sum_text = $entry->content->body;
+ my $sum_title = decode_entities($entry->title);
+ my $sum_text = decode_entities($entry->content->body);
my $current_file = `cat $STAT_FILE`;
if($current_file eq $ff->output_file) {