]> git.wh0rd.org - tt-rss.git/commitdiff
limit is_html() to only work on the begging of passed string
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 1 Nov 2012 08:47:37 +0000 (12:47 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 1 Nov 2012 08:47:37 +0000 (12:47 +0400)
include/functions.php

index 0e98b4a542d9cbd18a26e20de9a971fdf18f13bc..9edd2dd2c099b65791db95c743263c4d879d58b9 100644 (file)
        }
 
        function is_html($content) {
-               return preg_match("/<html|DOCTYPE html/i", $content) !== 0;
+               return preg_match("/<html|DOCTYPE html/i", substr($content, 0, 20)) !== 0;
        }
 
        function url_is_html($url, $login = false, $pass = false) {