summaryrefslogtreecommitdiffstats
path: root/3rdparty/SimplePie/library/SimplePie/Sanitize.php
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/SimplePie/library/SimplePie/Sanitize.php')
-rw-r--r--3rdparty/SimplePie/library/SimplePie/Sanitize.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/3rdparty/SimplePie/library/SimplePie/Sanitize.php b/3rdparty/SimplePie/library/SimplePie/Sanitize.php
index 9e11357df..6810cc49f 100644
--- a/3rdparty/SimplePie/library/SimplePie/Sanitize.php
+++ b/3rdparty/SimplePie/library/SimplePie/Sanitize.php
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @version 1.3
+ * @version 1.3.1
* @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -302,7 +302,7 @@ class SimplePie_Sanitize
if ($img->hasAttribute('src'))
{
$image_url = call_user_func($this->cache_name_function, $img->getAttribute('src'));
- $cache = $this->registry->call('Cache', 'create', array($this->cache_location, $image_url, 'spi'));
+ $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, $image_url, 'spi'));
if ($cache->load())
{
@@ -356,7 +356,11 @@ class SimplePie_Sanitize
if ($type & SIMPLEPIE_CONSTRUCT_IRI)
{
- $data = $this->registry->call('Misc', 'absolutize_url', array($data, $base));
+ $absolute = $this->registry->call('Misc', 'absolutize_url', array($data, $base));
+ if ($absolute !== false)
+ {
+ $data = $absolute;
+ }
}
if ($type & (SIMPLEPIE_CONSTRUCT_TEXT | SIMPLEPIE_CONSTRUCT_IRI))
@@ -412,7 +416,10 @@ class SimplePie_Sanitize
if ($element->hasAttribute($attribute))
{
$value = $this->registry->call('Misc', 'absolutize_url', array($element->getAttribute($attribute), $this->base));
- $element->setAttribute($attribute, $value);
+ if ($value !== false)
+ {
+ $element->setAttribute($attribute, $value);
+ }
}
}
}