]> git.mxchange.org Git - friendica.git/commitdiff
improve handling of relative feed url's
authorfriendica <info@friendica.com>
Wed, 2 May 2012 00:10:26 +0000 (17:10 -0700)
committerfriendica <info@friendica.com>
Wed, 2 May 2012 00:10:26 +0000 (17:10 -0700)
include/Scrape.php

index b20d7d6046dec03ce419b54b34e5cc1ae660da9b..22725260091cac26f848183c4ac5f5d12e46e938 100644 (file)
@@ -282,7 +282,7 @@ function scrape_feed($url) {
                }
        }
        if(! $basename)
-               $basename = substr($url,0,strrpos($url,'/')) . '/';
+               $basename = implode('/', array_slice(explode('/',$url),0,3)) . '/';
 
        $items = $dom->getElementsByTagName('link');