From ccc20849ffe297e09e046a086734c2c90e94420a Mon Sep 17 00:00:00 2001 From: Michael Bemmerl Date: Thu, 30 Nov 2023 16:52:51 +0000 Subject: [PATCH] [SchweinfurtBuergerinformationenBridge] Don't include images with data URIs as enclosures. (#3811) See also setEnclosures() in FeedItem.php: URIs with a path are required. --- bridges/SchweinfurtBuergerinformationenBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/SchweinfurtBuergerinformationenBridge.php b/bridges/SchweinfurtBuergerinformationenBridge.php index 349a9d8a..d1f5db15 100644 --- a/bridges/SchweinfurtBuergerinformationenBridge.php +++ b/bridges/SchweinfurtBuergerinformationenBridge.php @@ -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; } }