Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Dec 16, 2021
1 parent 4632ae3 commit a6eb653
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1222,11 +1222,11 @@ private function convertToHtmlEntities(string $htmlContent, string $charset = 'U

try {
return mb_convert_encoding($htmlContent, 'HTML-ENTITIES', $charset);
} catch (\Exception | \ValueError $e) {
} catch (\Exception|\ValueError $e) {
try {
$htmlContent = iconv($charset, 'UTF-8', $htmlContent);
$htmlContent = mb_convert_encoding($htmlContent, 'HTML-ENTITIES', 'UTF-8');
} catch (\Exception | \ValueError $e) {
} catch (\Exception|\ValueError $e) {
}

return $htmlContent;
Expand Down

0 comments on commit a6eb653

Please sign in to comment.