Skip to content

Commit

Permalink
mb_convert_encoding(): Handling HTML entities via mbstring is deprecated
Browse files Browse the repository at this point in the history
Use mb_encode_numericentity instead.
  • Loading branch information
kou committed Feb 6, 2024
1 parent 2cbd94f commit 5a0a7bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function testContactReportNotLikeExpression(): void

$dom = new \DOMDocument('1.0', 'utf-8');

$dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), LIBXML_NOERROR);
$dom->loadHTML(mb_encode_numericentity($content, [0x80, 0x10FFFF, 0, 0xFFFFF], 'UTF-8'), LIBXML_NOERROR);
$tbody = $dom->getElementById('reportTable')->getElementsByTagName('tbody')[0];
$rows = $tbody->getElementsByTagName('tr');

Expand Down

0 comments on commit 5a0a7bf

Please sign in to comment.