1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-01-16 13:50:01 +01:00

fix(FeedParser): dont emit content module (#4180)

This commit is contained in:
Dag 2024-07-31 20:34:33 +02:00 committed by GitHub
parent 8a1f2604aa
commit 615c533587
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -197,9 +197,6 @@ class FeedItem
|| $content instanceof simple_html_dom_node
) {
$content = (string) $content;
} elseif (is_array($content)) {
// Assuming this is the rss2.0 content module
$content = $content['encoded'] ?? '';
}
if (is_string($content)) {

View File

@ -168,8 +168,13 @@ final class FeedParser
$media = $feedItem->children($namespaces['media']);
}
if (isset($namespaces['content'])) {
$content = $feedItem->children($namespaces['content']);
$item['content'] = (string) $content;
}
foreach ($namespaces as $namespaceName => $namespaceUrl) {
if (in_array($namespaceName, ['', 'media'])) {
if (in_array($namespaceName, ['', 'content', 'media'])) {
continue;
}
$item[$namespaceName] = $this->parseModule($feedItem, $namespaceName, $namespaceUrl);