We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6eecb7 commit aa2829eCopy full SHA for aa2829e
src/Document.php
@@ -30,7 +30,7 @@ public function __construct(Extractor $extractor)
30
$contentType = $extractor->getResponse()->getHeaderLine('content-type');
31
preg_match('/charset="?(.*?)(?=$|\s|;|")/i', $contentType, $match);
32
if (!empty($match[1])) {
33
- $encoding = $match[1];
+ $encoding = trim($match[1], ',');
34
} elseif (!empty($html)) {
35
preg_match('/charset="?(.*?)(?=$|\s|;|")/i', $html, $match);
36
0 commit comments