Skip to content

Commit

Permalink
minor #44180 [DomCrawler] Fix HTML5 parser charset option (tgalopin)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.4 branch.

Discussion
----------

[DomCrawler] Fix HTML5 parser charset option

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Wrong usage of masterminds/html5 options

Commits
-------

53b3e40ab5 [DomCrawler] Fix HTML5 parser charset option
  • Loading branch information
nicolas-grekas committed Dec 28, 2021
2 parents a6eb653 + afbc304 commit 42de12b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ protected function sibling($node, $siblingDir = 'nextSibling')

private function parseHtml5(string $htmlContent, string $charset = 'UTF-8'): \DOMDocument
{
return $this->html5Parser->parse($this->convertToHtmlEntities($htmlContent, $charset), [], $charset);
return $this->html5Parser->parse($this->convertToHtmlEntities($htmlContent, $charset));
}

private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DOMDocument
Expand Down

0 comments on commit 42de12b

Please sign in to comment.