From 26ef8e730836aef6c5d3e78060add96628ffb680 Mon Sep 17 00:00:00 2001 From: berliner Date: Mon, 11 Nov 2024 09:32:52 +0100 Subject: [PATCH] HPC-9877: Fix encoding of sub articles --- .../modules/custom/ghi_content/src/Plugin/Block/Paragraph.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/modules/custom/ghi_content/src/Plugin/Block/Paragraph.php b/html/modules/custom/ghi_content/src/Plugin/Block/Paragraph.php index 1c17c2c88..2341db0b9 100644 --- a/html/modules/custom/ghi_content/src/Plugin/Block/Paragraph.php +++ b/html/modules/custom/ghi_content/src/Plugin/Block/Paragraph.php @@ -681,8 +681,8 @@ private function renderDomNode(\DOMNode $node) { // PHP DOMElement don't have a innerHTML property so this is the current way // of getting it. // @see https://bugs.php.net/bug.php?id=44762 - return implode('', array_map(function ($child) { - return $child->ownerDocument->saveXML($child); + return implode('', array_map(function (\DOMNode $child) { + return mb_convert_encoding($child->ownerDocument->saveXML($child), 'ISO-8859-1'); }, iterator_to_array($node->childNodes))); }