diff --git a/formats/AtomFormat.php b/formats/AtomFormat.php index 82d90106..6ebdf771 100644 --- a/formats/AtomFormat.php +++ b/formats/AtomFormat.php @@ -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 = ''; diff --git a/formats/MrssFormat.php b/formats/MrssFormat.php index 4e09c5d7..8f54ef0b 100644 --- a/formats/MrssFormat.php +++ b/formats/MrssFormat.php @@ -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) {