]> git.wh0rd.org - tt-rss.git/commitdiff
atom: fix rel=alternate links
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 2 May 2013 06:40:59 +0000 (10:40 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 2 May 2013 06:40:59 +0000 (10:40 +0400)
classes/feeditem/atom.php

index df1c31d99487816612e63a3697c1d951e0f3f972..b981dc319cdd175de1533f75e28cd7ed59de7552 100644 (file)
@@ -22,7 +22,8 @@ class FeedItem_Atom extends FeedItem_Common {
                $links = $this->elem->getElementsByTagName("link");
 
                foreach ($links as $link) {
-                       if ($link && $link->hasAttribute("href") && !$link->hasAttribute("rel")) {
+                       if ($link && $link->hasAttribute("href") && (!$link->hasAttribute("rel")
+                                       || $link->getAttribute("rel") == "alternate")) {
                                return $link->getAttribute("href");
                        }
                }