mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-28 05:54:19 +02:00
[formats] Fix enclosures
All bridges failed due to missing 'enclosures' element in the items array. With this commit all formats (ATOM, RSS and HTML) provide support for a single 'enclosure' element
This commit is contained in:
parent
3a2cb9ea1e
commit
42cbc2e889
3 changed files with 22 additions and 8 deletions
|
@ -30,6 +30,13 @@ class HtmlFormat extends FormatAbstract {
|
|||
. '</div>';
|
||||
}
|
||||
|
||||
$entryEnclosure = '';
|
||||
if(isset($item['enclosure'])){
|
||||
$entryEnclosure = '<div class="enclosure"><a href="'
|
||||
. $this->sanitizeHtml($item['enclosure'])
|
||||
. '">enclosure</a><div>';
|
||||
}
|
||||
|
||||
$entries .= <<<EOD
|
||||
|
||||
<section class="feeditem">
|
||||
|
@ -37,6 +44,7 @@ class HtmlFormat extends FormatAbstract {
|
|||
{$entryTimestamp}
|
||||
{$entryAuthor}
|
||||
{$entryContent}
|
||||
{$entryEnclosure}
|
||||
</section>
|
||||
|
||||
EOD;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue