From 0c066cb4285feb54cd9947c01dd759afdc0f37fb Mon Sep 17 00:00:00 2001 From: perrinjerome Date: Thu, 1 Mar 2018 04:08:32 +0900 Subject: Feed parsing: use author email when there's no author name (#1801) This is especially useful because when author is given as `Author Name` ( as in this example https://cyber.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt ), SimplePie will expose *Author Name* as `email`. --- app/Models/Feed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 13ab13df9..196d94931 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -355,7 +355,7 @@ class FreshRSS_Feed extends Minz_Model { $this->id(), $item->get_id(false, false), $title === null ? '' : $title, - $author === null ? '' : html_only_entity_decode(strip_tags($author->name)), + $author === null ? '' : html_only_entity_decode(strip_tags($author->name == null ? $author->email : $author->name)), $content === null ? '' : $content, $link === null ? '' : $link, $date ? $date : time() -- cgit v1.2.3