From 9776a2021607840d04ae2692d609557941f3507e Mon Sep 17 00:00:00 2001 From: Michael Bemmerl Date: Sun, 26 Nov 2023 22:36:26 +0100 Subject: [PATCH] [SchweinfurtBuergerinformationenBridge] Don't include images with data URIs as enclosures. 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 349a9d8a84e..d1f5db158f5 100644 --- a/bridges/SchweinfurtBuergerinformationenBridge.php +++ b/bridges/SchweinfurtBuergerinformationenBridge.php @@ -107,9 +107,9 @@ private function generateItemFromArticle($id) ]; // 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; } }