diff --git a/phpQuery.php b/phpQuery.php index 90391cd..b9c70a2 100644 --- a/phpQuery.php +++ b/phpQuery.php @@ -530,9 +530,9 @@ protected function charsetFixHTML($markup) $metaContentType = $matches[0][0]; $markup = substr($markup, 0, $matches[0][1]) . substr($markup, $matches[0][1] + strlen($metaContentType)); - $headStart = stripos($markup, ''); - $markup = substr($markup, 0, $headStart + 6) . $metaContentType - . substr($markup, $headStart + 6); + $headStart = strpos($markup, '>', stripos($markup, '