Update of picoFeed
This commit is contained in:
parent
7a29e07ba0
commit
55457b0e53
16
miniflux/vendor/PicoFeed/Parser.php
vendored
16
miniflux/vendor/PicoFeed/Parser.php
vendored
@ -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;
|
||||
}
|
||||
|
5
miniflux/vendor/PicoFeed/Reader.php
vendored
5
miniflux/vendor/PicoFeed/Reader.php
vendored
@ -44,10 +44,15 @@ class Reader
|
||||
|
||||
public function getFirstTag($data)
|
||||
{
|
||||
// Strip HTML comments
|
||||
$data = preg_replace('/<!--(.*)-->/Uis', '', $data);
|
||||
|
||||
// Find <?xml version....
|
||||
if (strpos($data, '<?xml') !== false) {
|
||||
|
||||
$data = substr($data, strrpos($data, '?>') + 2);
|
||||
|
||||
// Find the first tag
|
||||
$open_tag = strpos($data, '<');
|
||||
$close_tag = strpos($data, '>');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user