diff options
Diffstat (limited to 'lib/SimplePie')
| -rw-r--r-- | lib/SimplePie/SimplePie/File.php | 2 | ||||
| -rw-r--r-- | lib/SimplePie/SimplePie/Misc.php | 11 | ||||
| -rw-r--r-- | lib/SimplePie/SimplePie/Parser.php | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/lib/SimplePie/SimplePie/File.php b/lib/SimplePie/SimplePie/File.php index 8be38f145..b8a595571 100644 --- a/lib/SimplePie/SimplePie/File.php +++ b/lib/SimplePie/SimplePie/File.php @@ -110,7 +110,7 @@ class SimplePie_File curl_setopt($fp, CURLOPT_FAILONERROR, 1); curl_setopt($fp, CURLOPT_TIMEOUT, $timeout); curl_setopt($fp, CURLOPT_CONNECTTIMEOUT, $timeout); - curl_setopt($fp, CURLOPT_REFERER, $url); + curl_setopt($fp, CURLOPT_REFERER, SimplePie_Misc::url_remove_credentials($url)); curl_setopt($fp, CURLOPT_USERAGENT, $useragent); curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2); if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) diff --git a/lib/SimplePie/SimplePie/Misc.php b/lib/SimplePie/SimplePie/Misc.php index 40477c01e..1f338623c 100644 --- a/lib/SimplePie/SimplePie/Misc.php +++ b/lib/SimplePie/SimplePie/Misc.php @@ -1928,9 +1928,18 @@ class SimplePie_Misc public static function atom_10_content_construct_type($attribs) { + $type = ''; if (isset($attribs['']['type'])) { - $type = strtolower(trim($attribs['']['type'])); + $type = trim($attribs['']['type']); + } + elseif (isset($attribs[SIMPLEPIE_NAMESPACE_ATOM_10]['type'])) + {//FreshRSS + $type = trim($attribs[SIMPLEPIE_NAMESPACE_ATOM_10]['type']); + } + if ($type != '') + { + $type = strtolower($type); switch ($type) { case 'text': diff --git a/lib/SimplePie/SimplePie/Parser.php b/lib/SimplePie/SimplePie/Parser.php index 9348382ad..bdcc1a516 100644 --- a/lib/SimplePie/SimplePie/Parser.php +++ b/lib/SimplePie/SimplePie/Parser.php @@ -141,7 +141,7 @@ class SimplePie_Parser $dom = new DOMDocument(); $dom->recover = true; $dom->strictErrorChecking = false; - @$dom->loadXML($data); + @$dom->loadXML($data, LIBXML_NOERROR | LIBXML_NOWARNING); $this->encoding = $encoding = $dom->encoding = 'UTF-8'; $data2 = $dom->saveXML(); if (function_exists('mb_convert_encoding')) |
