From 78b840ed303f1946fbd4c3f2028b9e820d3140ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 16 Aug 2021 09:09:10 +0200 Subject: [PATCH] Fix Unicode in smiley titles see 5d0bf3ec233f62c6a5a68629e32b7eaa8c9d1dd3 see #4156 --- .../lib/system/html/output/node/HtmlOutputNodeImg.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeImg.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeImg.class.php index 72e1968c69..2a3ad37adc 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeImg.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeImg.class.php @@ -50,7 +50,10 @@ class HtmlOutputNodeImg extends AbstractHtmlOutputNode } else { // Ensure that the smiley's HTML is up to date. $doc = new \DOMDocument(); - $doc->loadHTML($smiley->getHtml()); + $doc->loadHTML(\sprintf( + '%s', + $smiley->getHtml() + )); $smileyNode = $element->ownerDocument->importNode($doc->getElementsByTagName('img')->item(0), true); $element->parentNode->replaceChild($smileyNode, $element); } -- 2.20.1