aboutsummaryrefslogtreecommitdiffstats
path: root/lib/simplepie/library/SimplePie.php
diff options
context:
space:
mode:
authorManuel Hiebel <leuhmanu@mageia.org>2023-09-05 22:16:29 +0200
committerManuel Hiebel <leuhmanu@mageia.org>2023-09-05 22:16:29 +0200
commit02b6ced8955cd5b773e958cd12f586b69933b84f (patch)
treeabc29dc6dae1babf44e18d28ba397dbc94285730 /lib/simplepie/library/SimplePie.php
parent4dc2c6193f1668d2bd6c9e7b4e6c9ccdcc6ac3a8 (diff)
downloadwww-02b6ced8955cd5b773e958cd12f586b69933b84f.tar
www-02b6ced8955cd5b773e958cd12f586b69933b84f.tar.gz
www-02b6ced8955cd5b773e958cd12f586b69933b84f.tar.bz2
www-02b6ced8955cd5b773e958cd12f586b69933b84f.tar.xz
www-02b6ced8955cd5b773e958cd12f586b69933b84f.zip
Update simplepie to try to fix mga#32236
Diffstat (limited to 'lib/simplepie/library/SimplePie.php')
-rwxr-xr-xlib/simplepie/library/SimplePie.php42
1 files changed, 33 insertions, 9 deletions
diff --git a/lib/simplepie/library/SimplePie.php b/lib/simplepie/library/SimplePie.php
index d4c2f0f1d..2ae78c359 100755
--- a/lib/simplepie/library/SimplePie.php
+++ b/lib/simplepie/library/SimplePie.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.5.6
+ * @version 1.6.0
* @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue
* @author Ryan Parman
* @author Sam Sneddon
@@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
/**
* SimplePie Version
*/
-define('SIMPLEPIE_VERSION', '1.5.6');
+define('SIMPLEPIE_VERSION', '1.6.0');
/**
* SimplePie Build
@@ -651,6 +651,13 @@ class SimplePie
public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');
/**
+ * @var array Stores the default attributes to be renamed by rename_attributes().
+ * @see SimplePie::rename_attributes()
+ * @access private
+ */
+ public $rename_attributes = array();
+
+ /**
* @var bool Should we throw exceptions, or use the old-style error property?
* @access private
*/
@@ -1223,6 +1230,15 @@ class SimplePie
$this->sanitize->encode_instead_of_strip($enable);
}
+ public function rename_attributes($attribs = '')
+ {
+ if ($attribs === '')
+ {
+ $attribs = $this->rename_attributes;
+ }
+ $this->sanitize->rename_attributes($attribs);
+ }
+
public function strip_attributes($attribs = '')
{
if ($attribs === '')
@@ -1785,7 +1801,7 @@ class SimplePie
}
/**
- * Get the error message for the occured error
+ * Get the error message for the occurred error
*
* @return string|array Error message, or array of messages for multifeeds
*/
@@ -2199,7 +2215,7 @@ class SimplePie
*/
public function get_base($element = array())
{
- if (!($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION) && !empty($element['xml_base_explicit']) && isset($element['xml_base']))
+ if (!empty($element['xml_base_explicit']) && isset($element['xml_base']))
{
return $element['xml_base'];
}
@@ -2647,13 +2663,19 @@ class SimplePie
}
}
- if (isset($this->data['headers']['link']) &&
- preg_match('/<([^>]+)>; rel='.preg_quote($rel).'/',
- $this->data['headers']['link'], $match))
+ if (isset($this->data['headers']['link']))
{
- return array($match[1]);
+ $link_headers = $this->data['headers']['link'];
+ if (is_string($link_headers)) {
+ $link_headers = array($link_headers);
+ }
+ $matches = preg_filter('/<([^>]+)>; rel='.preg_quote($rel).'/', '$1', $link_headers);
+ if (!empty($matches)) {
+ return $matches;
+ }
}
- else if (isset($this->data['links'][$rel]))
+
+ if (isset($this->data['links'][$rel]))
{
return $this->data['links'][$rel];
}
@@ -3310,3 +3332,5 @@ class SimplePie
}
}
}
+
+class_alias('SimplePie', 'SimplePie\SimplePie', false);