This patchset fixes a problem with the error message. As soon as the
message contains utf-8 characters, they are not properly displayed.
Resolves: #71557
Releases: master
Change-Id: I18dfb0862e89680f69f35ae6437bad5f808c7569
Reviewed-on: https://review.typo3.org/44704
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
$libxmlUseInternalErrors = libxml_use_internal_errors(true);
$dom = new \DOMDocument('1.0', 'utf-8');
$dom->preserveWhiteSpace = false;
- if (!$dom->loadHTML($html)) {
+ if (!$dom->loadHTML('<?xml encoding="utf-8">' . $html)) {
libxml_use_internal_errors($libxmlUseInternalErrors);
return array(
'html' => '',