1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-30 21:30:14 +02:00

feat: support itunes namespace in top channel feed (#3776)

Also preserves other properties.
This commit is contained in:
Dag
2024-01-09 20:18:33 +01:00
committed by GitHub
parent ea58c8d2bc
commit 3ce94409ab
22 changed files with 298 additions and 203 deletions

View File

@@ -6,11 +6,11 @@ class PlaintextFormat extends FormatAbstract
public function stringify()
{
$data = [];
$feed = $this->getFeed();
foreach ($this->getItems() as $item) {
$data[] = $item->toArray();
$feed['items'][] = $item->toArray();
}
$text = print_r($data, true);
$text = print_r($feed, true);
// Remove invalid non-UTF8 characters
ini_set('mbstring.substitute_character', 'none');
$text = mb_convert_encoding($text, $this->getCharset(), 'UTF-8');