Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions phpQuery/phpQuery/DOMDocumentWrapper.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -347,7 +347,6 @@ protected function charsetFromHTML($markup) {
return $contentType[1];
}
protected function charsetFromXML($markup) {
$matches;
// find declaration
preg_match('@<'.'?xml[^>]+encoding\\s*=\\s*(["|\'])(.*?)\\1@i',
$markup, $matches
Expand DownExpand Up@@ -386,7 +385,7 @@ protected function charsetAppendToHTML($html, $charset, $xhtml = false) {
.($xhtml ? '/' : '')
.'>';
if (strpos($html, '<head') === false) {
if (strpos($hltml, '<html') === false) {
if (strpos($html, '<html') === false) {
return $meta.$html;
} else {
return preg_replace(
Expand DownExpand Up@@ -674,4 +673,4 @@ public static function expandEmptyTag($tag, $xml){
}
return $xml;
}
}
}