diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 84132f05218..70824302bb4 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -244,7 +244,7 @@ class Mailing extends CommonObject global $conf, $langs; // Check properties - if ($this->body === 'InvalidHTMLStringCantBeCleaned') { + if (preg_match('/^InvalidHTMLStringCantBeCleaned/', $this->body)) { $this->error = 'InvalidHTMLStringCantBeCleaned'; return -1; } @@ -313,7 +313,7 @@ class Mailing extends CommonObject public function update($user, $notrigger = 0) { // Check properties - if ($this->body === 'InvalidHTMLStringCantBeCleaned') { + if (preg_match('/^InvalidHTMLStringCantBeCleaned/', $this->body)) { $this->error = 'InvalidHTMLStringCantBeCleaned'; return -1; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d4bef79259e..c3cd667aef6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7604,7 +7604,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' } catch (Exception $e) { // If error, invalid HTML string with no way to clean it //print $e->getMessage(); - $out = 'InvalidHTMLStringCantBeCleaned'; + $out = 'InvalidHTMLStringCantBeCleaned '.$e->getMessage(); } } @@ -7640,7 +7640,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' } catch (Exception $e) { // If error, invalid HTML string with no way to clean it //print $e->getMessage(); - $out = 'InvalidHTMLStringCantBeCleaned'; + $out = 'InvalidHTMLStringCantBeCleaned '.$e->getMessage(); } }