[SchweinfurtBuergerinformationenBridge] Don't include images with data URIs as enclosures. (#3811)

See also setEnclosures() in FeedItem.php: URIs with a path are required.
This commit is contained in:
Michael Bemmerl 2023-11-30 16:52:51 +00:00 committed by GitHub
parent 609eed1791
commit ccc20849ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -107,9 +107,9 @@ class SchweinfurtBuergerinformationenBridge extends BridgeAbstract
];
// Let's see if there are images in the content, and if yes, attach
// them as enclosures, but not images which are used for linking to an external site.
// them as enclosures, but not images which are used for linking to an external site and data URIs.
foreach ($images as $image) {
if ($image->class != 'imgextlink') {
if ($image->class != 'imgextlink' && parse_url($image->src, PHP_URL_SCHEME) != 'data') {
$item['enclosures'][] = $image->src;
}
}