]> git.wh0rd.org Git - tt-rss.git/commitdiff
get_favicon_url: only check base elements with href attribute
authorwn_ <invalid@email.com>
Sun, 1 Oct 2017 20:47:31 +0000 (15:47 -0500)
committerwn_ <invalid@email.com>
Sun, 1 Oct 2017 20:47:31 +0000 (15:47 -0500)
include/functions.php

index 71a6be2e987c5c5579acfce7bfa2726902a23092..2034547474d7adb6fd1a2c1d4ff16f0b33f324ef 100644 (file)
                        $doc->loadHTML($html);
                        $xpath = new DOMXPath($doc);
 
-                       $base = $xpath->query('/html/head/base');
+                       $base = $xpath->query('/html/head/base[@href]');
                        foreach ($base as $b) {
                                $url = rewrite_relative_url($url, $b->getAttribute("href"));
                                break;