From 027d94d41a62fb2180ab56eafcb27cd2ed74264d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Nov 2019 00:51:26 +0100 Subject: [PATCH] Revert change that create not required new lines --- htdocs/core/class/CMailFile.class.php | 4 ++-- htdocs/core/class/smtps.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 93a1906fac4..05cbcb0ca14 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1126,9 +1126,9 @@ class CMailFile if ($this->msgishtml) { // Similar code to forge a text from html is also in smtps.class.php - $strContentAltText = preg_replace("/]*>/", "\n", $strContent); + $strContentAltText = preg_replace("/]*>/", " ", $strContent); $strContentAltText = html_entity_decode(strip_tags($strContentAltText)); - $strContentAltText = rtrim(wordwrap($strContentAltText, 75, empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)?"\r\n":"\n")); + $strContentAltText = trim(wordwrap($strContentAltText, 75, empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)?"\r\n":"\n")); // Check if html header already in message, if not complete the message $strContent = $this->checkIfHTML($strContent); diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index a66fd267d54..5c5975b9284 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1383,9 +1383,9 @@ class SMTPs if ($strType == 'html') { // Similar code to forge a text from html is also in CMailFile.class.php - $strContentAltText = preg_replace("/]*>/", "\n", $strContent); + $strContentAltText = preg_replace("/]*>/", " ", $strContent); $strContentAltText = html_entity_decode(strip_tags($strContentAltText)); - $strContentAltText = rtrim(wordwrap($strContentAltText, 75, "\r\n")); + $strContentAltText = trim(wordwrap($strContentAltText, 75, "\r\n")); } // Make RFC2045 Compliant