Well… I’ve managed this.
(warning: I’m not a php dev!)
The culprit was following line in wp-shortcode-highlighter.php
:
$dom->loadHTML('<div>' . utf8_decode(stripslashes($data['post_content'])) . '</div>');
utf8_decode
function converts text into Latin-1 encoding.
To avoid the using of utf8_decode I patch the code with snippet from here: https://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly/8218649#8218649
$dom->loadHTML('<?xml encoding="utf-8" ?>' . '<div>' . stripslashes($data['post_content']) . '</div>');
I’m not sure about reliability of this solution but it works for me now.
-
This reply was modified 6 years, 8 months ago by Kirr.