aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_phpQuery.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib_phpQuery.php')
-rw-r--r--lib/lib_phpQuery.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lib_phpQuery.php b/lib/lib_phpQuery.php
index 411aa120c..1fabfcb6d 100644
--- a/lib/lib_phpQuery.php
+++ b/lib/lib_phpQuery.php
@@ -436,7 +436,8 @@ class DOMDocumentWrapper {
}
protected function isXML($markup) {
// return strpos($markup, '<?xml') !== false && stripos($markup, 'xhtml') === false;
- return strpos(substr($markup, 0, 100), '<'.'?xml') !== false;
+ $head = substr($markup, 0, 100);
+ return strpos($head, '<'.'?xml') !== false && stripos($head, '<html ') === false;
}
protected function contentTypeToArray($contentType) {
$matches = explode(';', trim(strtolower($contentType)));