diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index bb38c246127..10604bc532b 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -1639,10 +1639,10 @@ class ActionComm extends CommonObject
$datas['space'] = '
';
// $datas['email'] = '
'.img_picto('', 'email').' '.$langs->trans("Email").'';
$datas['mailtopic'] = '
'.$langs->trans('MailTopic').': '.dol_escape_htmltag($this->email_subject);
- $datas['mailfrom'] = '
'.$langs->trans('MailFrom').': '.str_replace(array('<', '>'), array('<', '>'), $this->email_from);
- $datas['mailto'] = '
'.$langs->trans('MailTo').': '.str_replace(array('<', '>'), array('<', '>'), $this->email_to);
+ $datas['mailfrom'] = '
'.$langs->trans('MailFrom').': '.dol_htmlentities($this->email_from);
+ $datas['mailto'] = '
'.$langs->trans('MailTo').': '.dol_htmlentities($this->email_to);
if (!empty($this->email_tocc)) {
- $datas['mailcc'] = '
'.$langs->trans('MailCC').': '.str_replace(array('<', '>'), array('<', '>'), $this->email_tocc);
+ $datas['mailcc'] = '
'.$langs->trans('MailCC').': '.dol_htmlentities($this->email_tocc);
}
/* Disabled because bcc must remain by definition not visible
if (!empty($this->email_tobcc)) {