summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian Weiske <[email protected]>2015-07-09 13:39:07 +0200
committerChristian Weiske <[email protected]>2015-07-09 13:39:07 +0200
commit5a4074a9f8b95d58a25aa630ab0acaeb00cf37cd (patch)
tree9f2d6fa0630e057b8fb7db68812fca648a7816d2 /include
parent12d880d77a166e87aebe49b17e0247c06cec6024 (diff)
Check for HTML in the first 100 bytes.
Some HTML pages have an XML header (XHTML), which alone is nearly 50 bytes. Thus we need to check for the HTML or doctype tags in the first 100 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/functions2.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions2.php b/include/functions2.php
index e3b6e535c..133352f75 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -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) {