Skip to content

Commit

Permalink
Feed parsing: use author email when there's no author name (FreshRSS#…
Browse files Browse the repository at this point in the history
…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`.
  • Loading branch information
perrinjerome authored and mdemoss committed Mar 25, 2021
1 parent ebc691d commit 68b23e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function loadEntries($feed) {
$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()
Expand Down

0 comments on commit 68b23e3

Please sign in to comment.