1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 06:55:56 +00:00

atom: fix rel=alternate links

This commit is contained in:
Andrew Dolgov
2013-05-02 10:40:59 +04:00
parent 602fe53496
commit 72c29b65d4

View 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");
}
}