mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-22 02:45:27 +02:00
[FeedExpander] support xhtml content / content with child elements (#3598)
* [core] support xhtml content type in FeedExpander * [FilterBridge] change defaultValue to exampleValue * [core] support content with child elements in FeedExpander
This commit is contained in:
@ -308,7 +308,16 @@ abstract class FeedExpander extends BridgeAbstract
|
||||
$item['author'] = (string)$feedItem->author->name;
|
||||
}
|
||||
if (isset($feedItem->content)) {
|
||||
$item['content'] = (string)$feedItem->content;
|
||||
$contentChildren = $feedItem->content->children();
|
||||
if (count($contentChildren) > 0) {
|
||||
$content = '';
|
||||
foreach ($contentChildren as $contentChild) {
|
||||
$content .= $contentChild->asXML();
|
||||
}
|
||||
$item['content'] = $content;
|
||||
} else {
|
||||
$item['content'] = (string)$feedItem->content;
|
||||
}
|
||||
}
|
||||
|
||||
//When "link" field is present, URL is more reliable than "id" field
|
||||
|
Reference in New Issue
Block a user