1
0
Fork 0
forked from blallo/rss-bridge

formats: Fix favicon not found if url contains path

This commit is contained in:
logmanoriginal 2018-06-30 10:16:16 +02:00
parent 2bc8daa101
commit 42c699f474
2 changed files with 6 additions and 2 deletions

View file

@ -16,7 +16,10 @@ class AtomFormat extends FormatAbstract{
$extraInfos = $this->getExtraInfos();
$title = $this->xml_encode($extraInfos['name']);
$uri = !empty($extraInfos['uri']) ? $extraInfos['uri'] : 'https://github.com/RSS-Bridge/rss-bridge';
$icon = $this->xml_encode($uri .'/favicon.ico');
$uriparts = parse_url($uri);
$icon = $this->xml_encode($uriparts['scheme'] . '://' . $uriparts['host'] .'/favicon.ico');
$uri = $this->xml_encode($uri);
$entries = '';

View file

@ -21,7 +21,8 @@ class MrssFormat extends FormatAbstract {
$uri = 'https://github.com/RSS-Bridge/rss-bridge';
}
$icon = $this->xml_encode($uri .'/favicon.ico');
$uriparts = parse_url($uri);
$icon = $this->xml_encode($uriparts['scheme'] . '://' . $uriparts['host'] .'/favicon.ico');
$items = '';
foreach($this->getItems() as $item) {