Skip to content

Commit

Permalink
fixes mb_convert_encoding deprecated warning in ParsedownExtra.php
Browse files Browse the repository at this point in the history
  • Loading branch information
leomoon committed Nov 12, 2024
1 parent ec206f4 commit 57b0d18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/parsedown-extra-0.8.1/ParsedownExtra.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,9 @@ protected function processTag($elementMarkup) # recursive
$DOMDocument = new DOMDocument;

# http://stackoverflow.com/q/11309194/200145
$elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8');
// $elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8');
$convmap = [0x80, 0x10FFFF, 0, 0xFFFFFF];
$elementMarkup = mb_encode_numericentity($elementMarkup, $convmap, 'UTF-8');

# http://stackoverflow.com/q/4879946/200145
$DOMDocument->loadHTML($elementMarkup);
Expand Down

0 comments on commit 57b0d18

Please sign in to comment.