From: Daniel Siepmann Date: Thu, 12 Jan 2023 12:43:49 +0000 (+0100) Subject: Properly handle feed item urls with surrounding whitespace X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6633b0af4b5a564843af8e164f04be31b4f772c9;p=friendica.git 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 --- diff --git a/src/Util/Network.php b/src/Util/Network.php index f9f32d4222..30c4798a5a 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; }