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
This commit is contained in:
Daniel Siepmann 2023-01-12 13:43:49 +01:00
parent ec54b303c5
commit 6633b0af4b
No known key found for this signature in database
GPG key ID: 33D6629915560EF4

View file

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