aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-03-01 16:03:44 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-01 16:03:44 +0100
commit467ca9d0deea511700656d4433dbd915b137b748 (patch)
treeff0ff334ff5ad8fcca843294980a9247732fe4da /lib
parent7c74653cc21b1dda382ec45544ed087d441480a5 (diff)
Specific HTML load for lib_phpQuery.php (#4243)
And reverts a less appropriate workaround for the same thing in https://github.com/FreshRSS/FreshRSS/pull/4220 Avoids XML errors when believing that a document might be XML/XHTML.
Diffstat (limited to 'lib')
-rw-r--r--lib/lib_phpQuery.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/lib_phpQuery.php b/lib/lib_phpQuery.php
index 1fabfcb6d..411aa120c 100644
--- a/lib/lib_phpQuery.php
+++ b/lib/lib_phpQuery.php
@@ -436,8 +436,7 @@ class DOMDocumentWrapper {
}
protected function isXML($markup) {
// return strpos($markup, '<?xml') !== false && stripos($markup, 'xhtml') === false;
- $head = substr($markup, 0, 100);
- return strpos($head, '<'.'?xml') !== false && stripos($head, '<html ') === false;
+ return strpos(substr($markup, 0, 100), '<'.'?xml') !== false;
}
protected function contentTypeToArray($contentType) {
$matches = explode(';', trim(strtolower($contentType)));