From 491ef970727e335c3f398612480bb482e0a1a42b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 29 Jul 2013 16:16:47 +0400 Subject: [PATCH] atom: only perform xml:base based rewriting if base element exists (closes #761) --- classes/feeditem/atom.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"); + } } } -- 2.39.5