diff --git a/web/modules/addevhtmlentities/addevhtmlentities.php b/web/modules/addevhtmlentities/addevhtmlentities.php
new file mode 100644
index 00000000..826a9a09
--- /dev/null
+++ b/web/modules/addevhtmlentities/addevhtmlentities.php
@@ -0,0 +1,44 @@
+name = 'addevhtmlentities';
+ $this->author = 'AD-DEV';
+ $this->version = '1.0.1';
+ $this->description = $this->l('Removes HTML entities present in customer messages.');
+ $this->displayName = $this->l('Customer messages - HTML entities remover');
+ $this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
+
+ $this->bootstrap = true;
+ parent::__construct();
+ }
+
+ public function install()
+ {
+ $rows = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
+ SELECT `id_customer_message`, `message` FROM `'._DB_PREFIX_.'customer_message`
+ ');
+ $update_sqls = [];
+ foreach($rows as $row) {
+ $id = (int)$row['id_customer_message'];
+ if ($id > 0) {
+ $decoded = strip_tags(html_entity_decode($row['message']));
+ $update_sqls[] = '
+ UPDATE `'._DB_PREFIX_.'customer_message`
+ SET `message`="'.pSQL($decoded).'"
+ WHERE `id_customer_message`='.$id.';
+ ';
+ }
+ }
+ if (count($update_sqls) > 0) {
+// die(var_export(
+ Db::getInstance(_PS_USE_SQL_SLAVE_)->query(
+ implode("\n", $update_sqls)
+// ,true)
+ );
+ }
+ return parent::install();
+ }
+}
diff --git a/web/modules/addevhtmlentities/index.php b/web/modules/addevhtmlentities/index.php
new file mode 100644
index 00000000..f799c144
--- /dev/null
+++ b/web/modules/addevhtmlentities/index.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/web/modules/addevhtmlentities/logo.png b/web/modules/addevhtmlentities/logo.png
new file mode 100644
index 00000000..4ce27db8
Binary files /dev/null and b/web/modules/addevhtmlentities/logo.png differ
diff --git a/web/modules/addevhtmlentities/override/classes/CustomerMessage.php b/web/modules/addevhtmlentities/override/classes/CustomerMessage.php
new file mode 100644
index 00000000..fea454f3
--- /dev/null
+++ b/web/modules/addevhtmlentities/override/classes/CustomerMessage.php
@@ -0,0 +1,43 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+/**
+ * Class CustomerMessageCore.
+ */
+class CustomerMessage extends CustomerMessageCore
+{
+ public function add($auto_date = true, $null_values = false)
+ {
+ $this->message = strip_tags(html_entity_decode($this->message, ENT_QUOTES|ENT_HTML401));
+ return parent::add($auto_date, $null_values);
+ }
+
+ public function save($null_values = false, $auto_date = true)
+ {
+ $this->message = strip_tags(html_entity_decode($this->message, ENT_QUOTES|ENT_HTML401));
+ return parent::save($null_values, $auto_date);
+ }
+}
diff --git a/web/modules/addevhtmlentities/override/classes/index.php b/web/modules/addevhtmlentities/override/classes/index.php
new file mode 100644
index 00000000..f799c144
--- /dev/null
+++ b/web/modules/addevhtmlentities/override/classes/index.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/web/modules/addevhtmlentities/override/index.php b/web/modules/addevhtmlentities/override/index.php
new file mode 100644
index 00000000..f799c144
--- /dev/null
+++ b/web/modules/addevhtmlentities/override/index.php
@@ -0,0 +1,35 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/web/override/classes/CustomerMessage.php b/web/override/classes/CustomerMessage.php
new file mode 100644
index 00000000..b69e1fb5
--- /dev/null
+++ b/web/override/classes/CustomerMessage.php
@@ -0,0 +1,51 @@
+
+ * @copyright 2007-2018 PrestaShop SA
+ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
+ * International Registered Trademark & Property of PrestaShop SA
+ */
+/**
+ * Class CustomerMessageCore.
+ */
+class CustomerMessage extends CustomerMessageCore
+{
+ /*
+ * module: addevhtmlentities
+ * date: 2020-07-02 11:49:58
+ * version: 1.0.1
+ */
+ public function add($auto_date = true, $null_values = false)
+ {
+ $this->message = strip_tags(html_entity_decode($this->message, ENT_QUOTES|ENT_HTML401));
+ return parent::add($auto_date, $null_values);
+ }
+ /*
+ * module: addevhtmlentities
+ * date: 2020-07-02 11:49:58
+ * version: 1.0.1
+ */
+ public function save($null_values = false, $auto_date = true)
+ {
+ $this->message = strip_tags(html_entity_decode($this->message, ENT_QUOTES|ENT_HTML401));
+ return parent::save($null_values, $auto_date);
+ }
+}