Hello,
In emogrifier.php a waning is generated for PHP8:
Deprecated
: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in ..components/com_jmailalerts/models/emogrifier.php
I solved it with two modifications:
1.
// return mb_convert_encoding($xmlDocument->saveHTML(), self::ENCODING, 'HTML-ENTITIES');
$encoded_markup = mb_encode_numericentity(
htmlspecialchars_decode(
htmlentities( $xmlDocument->saveHTML(), ENT_NOQUOTES, self::ENCODING, false ),
ENT_NOQUOTES
),
array( 0x80, 0x10FFFF, 0, ~0 ),
self::ENCODING
);
return $encoded_markup;
2.
// return mb_convert_encoding($bodyWithoutUnprocessableTags, 'HTML-ENTITIES', self::ENCODING);
$encoded_markup = mb_encode_numericentity(
htmlspecialchars_decode(
htmlentities( $bodyWithoutUnprocessableTags, ENT_NOQUOTES, self::ENCODING, false ),
ENT_NOQUOTES
),
array( 0x80, 0x10FFFF, 0, ~0 ),
self::ENCODING
);
return $encoded_markup;
This modifications can be found at:
//see:
https://github.com/frocentric/wordpress/commit/31533191044d626c55d940236eddb5461d9e41e9
Regards,
Peter