Merge pull request #467 from cweiske/fix-html-detection

Check for HTML in the first 100 bytes.
master
Andrew Dolgov 10 years ago
commit 75112f78c4

@ -1792,7 +1792,7 @@
}
function is_html($content) {
return preg_match("/<html|DOCTYPE html/i", substr($content, 0, 20)) !== 0;
return preg_match("/<html|DOCTYPE html/i", substr($content, 0, 100)) !== 0;
}
function url_is_html($url, $login = false, $pass = false) {

Loading…
Cancel
Save