]> git.wh0rd.org - tt-rss.git/commitdiff
get_feeds_from_html: add rel='alternate feed'
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 5 Mar 2014 14:34:13 +0000 (18:34 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 5 Mar 2014 14:34:13 +0000 (18:34 +0400)
include/functions2.php

index 4e97961472b56598e18e88a40e0256c135278f00..60c3fe59a2befc5dcfcb3ff513e35337f655770c 100644 (file)
                $doc->loadHTML($content);
                $xpath = new DOMXPath($doc);
                $entries = $xpath->query('/html/head/link[@rel="alternate" and '.
-                       '(contains(@type,"rss") or contains(@type,"atom"))]|/html/head/link[@rel="feed"]');
+                       '(contains(@type,"rss") or contains(@type,"atom"))]|/html/head/link[@rel="feed" or @rel="alternate feed"]');
                $feedUrls = array();
                foreach ($entries as $entry) {
                        if ($entry->hasAttribute('href')) {