DrMichaD
Try something real quick please. Replace the old htmlawed file with the new one again, go to this line in your code, and replace the entire return htmLawed(…); line with the following:
$current = setlocale(LC_CTYPE, '0');
$new = setlocale(LC_CTYPE, 'C') ?: setlocale(LC_CTYPE, 'English_United States.1252') ?: null;
try {
return htmLawed($html, $config, $spec);
} finally {
if ($current !== false && $current !== null)
@setlocale(LC_CTYPE, $current);
}
Then restart your webserver and PHP-FPM. Trust me, this matters a lot.
This basically forces a deterministic locale so we can see if this allows the content to pass and then sets it back to the original locale afterwards so that nothing else gets affected.
Cheers.