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:
parent
ec54b303c5
commit
6633b0af4b
1 changed files with 1 additions and 0 deletions
|
@ -376,6 +376,7 @@ class Network
|
||||||
*/
|
*/
|
||||||
public static function addBasePath(string $url, string $basepath): string
|
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))) {
|
if (!empty(parse_url($url, PHP_URL_SCHEME)) || empty(parse_url($basepath, PHP_URL_SCHEME)) || empty($url) || empty(parse_url($url))) {
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue