aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Feed.php
diff options
context:
space:
mode:
authorGravatar perrinjerome <perrinjerome@gmail.com> 2018-03-01 04:08:32 +0900
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-02-28 20:08:32 +0100
commit0c066cb4285feb54cd9947c01dd759afdc0f37fb (patch)
tree4611af440e49dc3bef9ff4a957f494db8710d520 /app/Models/Feed.php
parentab2aeae8d47208088423716998d3b5d35311909d (diff)
Feed parsing: use author email when there's no author name (#1801)
This is especially useful because when author is given as `<author>Author Name</author>` ( as in this example https://cyber.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt ), SimplePie will expose *Author Name* as `email`.
Diffstat (limited to 'app/Models/Feed.php')
-rw-r--r--app/Models/Feed.php2
1 files changed, 1 insertions, 1 deletions
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()