From: Andrew Dolgov Date: Mon, 29 Jul 2013 12:16:47 +0000 (+0400) Subject: atom: only perform xml:base based rewriting if base element exists (closes #761) X-Git-Tag: 1.10~61 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=491ef970727e335c3f398612480bb482e0a1a42b;p=tt-rss.git atom: only perform xml:base based rewriting if base element exists (closes #761) --- diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php index f82c582d..8a21d614 100644 --- a/classes/feeditem/atom.php +++ b/classes/feeditem/atom.php @@ -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"); + } } }