[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

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;
}
}