diff options
author | Andrew Dolgov <[email protected]> | 2012-11-01 12:47:37 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-11-01 12:47:37 +0400 |
commit | 32b8671144eb9c298481e5d69f6985c0f88f1e3d (patch) | |
tree | d822c7ffe530f924f2153fac07fedf6b7f1cdf33 | |
parent | 9a5f5633c0fa264fe8bb867f1940e268991de797 (diff) |
limit is_html() to only work on the begging of passed string
-rw-r--r-- | include/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php index 0e98b4a54..9edd2dd2c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -4707,7 +4707,7 @@ } 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) { |