mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 05:35:56 +00:00
atom: only perform xml:base based rewriting if base element exists (closes #761)
This commit is contained in:
@@ -42,7 +42,11 @@ class FeedItem_Atom extends FeedItem_Common {
|
|||||||
|| $link->getAttribute("rel") == "standout")) {
|
|| $link->getAttribute("rel") == "standout")) {
|
||||||
$base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)", $link);
|
$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");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user