Update SimplePie to 1.3.1. Props rmccue, ocean90. fixes #22321

git-svn-id: https://develop.svn.wordpress.org/trunk@22366 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-11-05 14:25:25 +00:00
parent 38b29deb8e
commit 80653d0e73
32 changed files with 214 additions and 55 deletions
+11 -4
View File
@@ -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);
}
}
}
}