aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/SimplePie/SimplePie.php4
-rw-r--r--lib/SimplePie/SimplePie/Sanitize.php22
2 files changed, 11 insertions, 15 deletions
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php
index 0acad05d8..ec95861cd 100644
--- a/lib/SimplePie/SimplePie.php
+++ b/lib/SimplePie/SimplePie.php
@@ -1308,9 +1308,9 @@ class SimplePie
}
/**
- * Set the list of domains for which force HTTPS.
+ * Set the list of domains for which to force HTTPS.
* @see SimplePie_Sanitize::set_https_domains()
- * FreshRSS
+ * @param array List of HTTPS domains. Example array('biz', 'example.com', 'example.org', 'www.example.net').
*/
public function set_https_domains($domains = array())
{
diff --git a/lib/SimplePie/SimplePie/Sanitize.php b/lib/SimplePie/SimplePie/Sanitize.php
index 4805974bb..7d83bbbf1 100644
--- a/lib/SimplePie/SimplePie/Sanitize.php
+++ b/lib/SimplePie/SimplePie/Sanitize.php
@@ -73,13 +73,12 @@ class SimplePie_Sanitize
var $replace_url_attributes = null;
/**
- * List of domains for which force HTTPS.
+ * List of domains for which to force HTTPS.
* @see SimplePie_Sanitize::set_https_domains()
- * Array is tree split at DNS levels. Example:
- * array('biz' => true, 'com' => array('example' => true), 'net' => array('example') => array('www' => true))
- * FreshRSS
+ * Array is a tree split at DNS levels. Example:
+ * array('biz' => true, 'com' => array('example' => true), 'net' => array('example' => array('www' => true)))
*/
- var $https_domains = array('com' => array('dailymotion' => true, 'youtube' => true));
+ var $https_domains = array();
public function __construct()
{
@@ -251,10 +250,9 @@ class SimplePie_Sanitize
}
/**
- * Set the list of domains for which force HTTPS.
+ * Set the list of domains for which to force HTTPS.
* @see SimplePie_Misc::https_url()
* Example array('biz', 'example.com', 'example.org', 'www.example.net');
- * FreshRSS
*/
public function set_https_domains($domains)
{
@@ -281,8 +279,7 @@ class SimplePie_Sanitize
}
/**
- * Check if the domain is in the list of forced HTTPS
- * FreshRSS
+ * Check if the domain is in the list of forced HTTPS.
*/
protected function is_https_domain($domain)
{
@@ -304,8 +301,7 @@ class SimplePie_Sanitize
}
/**
- * Force HTTPS for selected Web sites
- * FreshRSS
+ * Force HTTPS for selected Web sites.
*/
public function https_url($url)
{
@@ -516,9 +512,9 @@ class SimplePie_Sanitize
if ($element->hasAttribute($attribute))
{
$value = $this->registry->call('Misc', 'absolutize_url', array($element->getAttribute($attribute), $this->base));
- $value = $this->https_url($value); //FreshRSS
- if ($value)
+ if ($value !== false)
{
+ $value = $this->https_url($value);
$element->setAttribute($attribute, $value);
}
}