Skip to content

Commit e4423db

Browse files
committed
Merge pull request #17 from ribugent/master
Fix lib/XML/Feed/Entry/Format/RSS.pm crash
2 parents fe4e5e6 + b6f39ae commit e4423db

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

Build.PL

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ my $build = Module::Build
3939
'Gabor Szabo <[email protected]>',
4040
'Minty Walker <[email protected]>',
4141
'Karen Etheridge <[email protected]>',
42+
'Gerard Ribugent Navarro <[email protected]>',
4243
],
4344
},
4445
);

Changes

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2014-01-28 Gerard Ribugent Navarro <[email protected]>
2+
3+
* Fix lib/XML/Feed/Entry/Format/RSS.pm crash
4+
https://github.com/davorg/xml-feed/issues/16
5+
16
2012-07-10 Dave Cross <[email protected]>
27

38
* Change the User Agent to identify as XML::Feed (SZABGAB)
@@ -78,7 +83,7 @@
7883
2010-03-22 Simon Wistow <[email protected]>
7984

8085
* Build.PL, Changes, lib/XML/Feed.pm, lib/XML/Feed/Format/Atom.pm: Fix bug in
81-
conversion process between RSS and Atom where HTML got double encoded
86+
conversion process between RSS and Atom where HTML got double encoded
8287
https://rt.cpan.org/Public/Bug/Display.html?id=44899
8388

8489
* MANIFEST, lib/XML/Feed/Format/Atom.pm: Fix double encoding bug?
@@ -199,7 +204,7 @@
199204
* Changes, lib/XML/Feed.pm: Fix fetching through proxies
200205

201206
* Changes, lib/XML/Feed.pm, lib/XML/Feed/Atom.pm, lib/XML/Feed/Entry.pm,
202-
lib/XML/Feed/RSS.pm, t/02-create.t: Add support for self linking and GeoRSS
207+
lib/XML/Feed/RSS.pm, t/02-create.t: Add support for self linking and GeoRSS
203208
Patches from Shlomi Fish http://rt.cpan.org/Ticket/Display.html?id=39924 and
204209
Scott Gifford http://rt.cpan.org/Ticket/Display.html?id=40046
205210

@@ -246,12 +251,12 @@
246251
* Changes, lib/XML/Feed/Atom.pm, t/07-atom10-create.t: Allow accessors to
247252
make sure things validate
248253

249-
* Changes, Makefile.PL: Force working version XML::Atom
254+
* Changes, Makefile.PL: Force working version XML::Atom
250255
http://rt.cpan.org/Public/Bug/Display.html?id=22548
251256
http://rt.cpan.org/Public/Bug/Display.html?id=19920
252257

253258
* Changes, lib/XML/Feed.pm, lib/XML/Feed/Atom.pm, lib/XML/Feed/RSS.pm: Allow
254-
passing through of initialisation options.
259+
passing through of initialisation options.
255260
http://rt.cpan.org/Public/Bug/Display.html?id=24729
256261

257262
* Changes, lib/XML/Feed.pm: Allow specification of the parsing format. Fix

lib/XML/Feed/Entry/Format/RSS.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ sub content {
8989
} else {
9090
my $base;
9191
my $body =
92-
$item->{content}{encoded} ||
92+
(ref $item->{content}? $item->{content}{encoded} : $item->{content}) ||
9393
$item->{'http://www.w3.org/1999/xhtml'}{body} ||
9494
$item->{description};
9595
if ('HASH' eq ref($body)) {
@@ -170,7 +170,7 @@ sub modified {
170170
$ts =~ s/^\s+//;
171171
$ts =~ s/\s+$//;
172172
return eval { DateTime::Format::W3CDTF->parse_datetime($ts) } || eval { XML::Atom::Util::iso2dt($ts) };
173-
}
173+
}
174174
}
175175
}
176176

0 commit comments

Comments
 (0)