From 293ec22b5bde02b6f52f839adf1d861197de555e Mon Sep 17 00:00:00 2001 From: Sander de Jong Date: Fri, 5 Aug 2022 12:00:03 +0200 Subject: [PATCH] Replace functionality that's deprecated in PHP 8.2 --- src/CssToInlineStyles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CssToInlineStyles.php b/src/CssToInlineStyles.php index 3268c5f..6efc06f 100644 --- a/src/CssToInlineStyles.php +++ b/src/CssToInlineStyles.php @@ -113,7 +113,7 @@ protected function createDomDocumentFromHtml($html) { $document = new \DOMDocument('1.0', 'UTF-8'); $internalErrors = libxml_use_internal_errors(true); - $document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); + $document->loadHTML(mb_encode_numericentity($html, [0x80, 0xFFFF, 0, 0xFFFF], 'UTF-8')); libxml_use_internal_errors($internalErrors); $document->formatOutput = true;