From 6633b0af4b5a564843af8e164f04be31b4f772c9 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 12 Jan 2023 13:43:49 +0100 Subject: [PATCH] Properly handle feed item urls with surrounding whitespace Some feeds might have whitespace around the URLs of each item. This can't be handled by parse_url. Therefore the incoming url is trimmed to not contain any surrounding whitespace for proper handling. Relates: #12658 --- src/Util/Network.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Util/Network.php b/src/Util/Network.php index f9f32d422..30c4798a5 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -376,6 +376,7 @@ class Network */ public static function addBasePath(string $url, string $basepath): string { + $url = trim($url); if (!empty(parse_url($url, PHP_URL_SCHEME)) || empty(parse_url($basepath, PHP_URL_SCHEME)) || empty($url) || empty(parse_url($url))) { return $url; }