]> git.wh0rd.org Git - tt-rss.git/commitdiff
atom: only perform xml:base based rewriting if base element exists (closes #761)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 29 Jul 2013 12:16:47 +0000 (16:16 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 29 Jul 2013 12:16:47 +0000 (16:16 +0400)
classes/feeditem/atom.php

index f82c582da922bbe558672589e8267c6eb733a71d..8a21d6142fc2e0e0f9bac69946c1fa96258e2e38 100644 (file)
@@ -42,7 +42,11 @@ class FeedItem_Atom extends FeedItem_Common {
                                        || $link->getAttribute("rel") == "standout")) {
                                $base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)", $link);
 
-                               return rewrite_relative_url($base, $link->getAttribute("href"));
+                               if ($base)
+                                       return rewrite_relative_url($base, $link->getAttribute("href"));
+                               else
+                                       return $link->getAttribute("href");
+
                        }
                }
        }