diff options
| author | 2016-09-25 15:55:28 +0200 | |
|---|---|---|
| committer | 2016-09-25 15:55:28 +0200 | |
| commit | a37484fd2fee58d48d8e58535b34d8c63352c51e (patch) | |
| tree | ebbcddb38d2f60f64c138dcdee6ebe8ea6a25067 /lib/SimplePie | |
| parent | 74f9aa310d301cbec18040975bdb1b7e03a99b24 (diff) | |
Fix SimplePie autodiscovery for text/xml HTML pages
https://github.com/FreshRSS/FreshRSS/issues/1264
Diffstat (limited to 'lib/SimplePie')
| -rw-r--r-- | lib/SimplePie/SimplePie/Content/Type/Sniffer.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/SimplePie/SimplePie/Content/Type/Sniffer.php b/lib/SimplePie/SimplePie/Content/Type/Sniffer.php index a32f47f59..daec3607d 100644 --- a/lib/SimplePie/SimplePie/Content/Type/Sniffer.php +++ b/lib/SimplePie/SimplePie/Content/Type/Sniffer.php @@ -109,9 +109,7 @@ class SimplePie_Content_Type_Sniffer { return $this->unknown(); } - elseif (substr($official, -4) === '+xml' - || $official === 'text/xml' - || $official === 'application/xml') + elseif (substr($official, -4) === '+xml') { return $official; } @@ -126,7 +124,9 @@ class SimplePie_Content_Type_Sniffer return $official; } } - elseif ($official === 'text/html') + elseif ($official === 'text/html' + || $official === 'text/xml' + || $official === 'application/xml') { return $this->feed_or_html(); } |
