We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7486765 commit 346e2eaCopy full SHA for 346e2ea
src/PHPHtmlParser/Dom.php
@@ -633,7 +633,7 @@ protected function detectCharset()
633
return false;
634
}
635
$matches = [];
636
- if (preg_match('/charset=(.+)/', $content, $matches)) {
+ if (preg_match('/charset=([^; ]+)/', $content, $matches)) {
637
$encode->from(trim($matches[1]));
638
$this->root->propagateEncoding($encode);
639
0 commit comments