A free, self-hostable news aggregator…
SimplePie fix base (#4565)
Alexandre Alapetite442019a0548d
diff --git a/lib/SimplePie/SimplePie/Item.php b/lib/SimplePie/SimplePie/Item.phpindex 3ac4fa882..2fb1d3284 100644--- a/lib/SimplePie/SimplePie/Item.php+++ b/lib/SimplePie/SimplePie/Item.php@@ -152,15 +152,21 @@ class SimplePie_Item}/**- * Get the base URL value from the parent feed- *- * Uses `<xml:base>`+ * Get the base URL value.+ * Uses `<xml:base>`, or item link, or feed base URL.** @param array $element* @return string*/public function get_base($element = array()){+ if (!empty($element['xml_base_explicit']) && isset($element['xml_base'])) {+ return $element['xml_base'];+ }+ $link = $this->get_permalink();+ if ($link != null) {+ return $link;+ }return $this->feed->get_base($element);}