diff options
author | Andrew Dolgov <[email protected]> | 2019-05-16 10:07:22 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-05-16 10:07:22 +0300 |
commit | de713035fd96684cf8817b8cf0e5a980690ca260 (patch) | |
tree | 93414cf65da8493faf9f488cdb084cb9a5eb30bb /classes/feeds.php | |
parent | 9423d72f6c82f05a5c7512370ac413776747f540 (diff) |
when subscribing, check for valid html content type before checking if requested document has HTML doctype/start element
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-x | classes/feeds.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index 03f13539f..c3a2098b5 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -1131,6 +1131,7 @@ class Feeds extends Handler_Protected { global $fetch_last_error; global $fetch_last_error_content; + global $fetch_last_content_type; $pdo = Db::pdo(); @@ -1152,7 +1153,7 @@ class Feeds extends Handler_Protected { return array("code" => 5, "message" => $fetch_last_error); } - if (is_html($contents)) { + if (mb_strpos($fetch_last_content_type, "html") !== FALSE && is_html($contents)) { $feedUrls = get_feeds_from_html($url, $contents); if (count($feedUrls) == 0) { |