diff --git a/miniflux/vendor/PicoFeed/Parser.php b/miniflux/vendor/PicoFeed/Parser.php index 40b0ba8..9522436 100644 --- a/miniflux/vendor/PicoFeed/Parser.php +++ b/miniflux/vendor/PicoFeed/Parser.php @@ -167,13 +167,25 @@ class Rss20 extends Parser $content = (string) $entry->description; } + if ($author === '') { + + if (isset($entry->author)) { + + $author = (string) $entry->author; + } + else if (isset($xml->channel->webMaster)) { + + $author = (string) $xml->channel->webMaster; + } + } + $item = new \StdClass; - $item->id = (string) $entry->guid; $item->title = (string) $entry->title; $item->url = $link ?: (string) $entry->link; + $item->id = isset($entry->guid) ? (string) $entry->guid : $item->url; $item->updated = strtotime($pubdate ?: (string) $entry->pubDate) ?: $this->updated; $item->content = $this->filterHtml($content, $item->url); - $item->author = $author ?: (string) $xml->channel->webMaster; + $item->author = $author; $this->items[] = $item; } diff --git a/miniflux/vendor/PicoFeed/Reader.php b/miniflux/vendor/PicoFeed/Reader.php index 47e2586..cee50e1 100644 --- a/miniflux/vendor/PicoFeed/Reader.php +++ b/miniflux/vendor/PicoFeed/Reader.php @@ -44,10 +44,15 @@ class Reader public function getFirstTag($data) { + // Strip HTML comments + $data = preg_replace('//Uis', '', $data); + + // Find ') + 2); + // Find the first tag $open_tag = strpos($data, '<'); $close_tag = strpos($data, '>');