From 51adb5202200f3058f04698eba7603cabd43a415 Mon Sep 17 00:00:00 2001 From: Steven Ngesera Date: Thu, 21 Dec 2023 21:08:37 +0300 Subject: [PATCH] Fix HTML to text process is broken --- modules/core/message_functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/message_functions.php b/modules/core/message_functions.php index 8f922515bf..86cfe81bd6 100644 --- a/modules/core/message_functions.php +++ b/modules/core/message_functions.php @@ -435,7 +435,7 @@ class HTMLToText { function __construct($html) { $doc = new DOMDocument(); - $doc->loadHTML(htmlentities($html, ENT_QUOTES | ENT_HTML5, 'UTF-8')); + $doc->loadHTML(html_entity_decode($html, ENT_QUOTES | ENT_HTML5, 'UTF-8')); if (trim($html) && $doc->hasChildNodes()) { $this->parse_nodes($doc->childNodes); }