From: Tim Düsterhus Date: Mon, 16 Aug 2021 07:09:10 +0000 (+0200) Subject: Fix Unicode in smiley titles X-Git-Tag: 5.4.5_RC_1~44^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=78b840ed303f1946fbd4c3f2028b9e820d3140ff;p=GitHub%2FWoltLab%2FWCF.git Fix Unicode in smiley titles see 5d0bf3ec233f62c6a5a68629e32b7eaa8c9d1dd3 see #4156 --- 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); }