Browse Source

atom: fix rel=alternate links

Andrew Dolgov 7 years ago
parent
commit
72c29b65d4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      classes/feeditem/atom.php

+ 2 - 1
classes/feeditem/atom.php

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