Skip to content
Snippets Groups Projects
Commit 93007ebf authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'B16475_empty_space_in_email' into 'develop'

B16475: Catch first all '<br />' strings in sendmail and replace them with...

See merge request !594
parents 5c129425 7226e73f
No related branches found
No related tags found
2 merge requests!596New version v23.6.2,!594B16475: Catch first all '<br />' strings in sendmail and replace them with...
Pipeline #9769 passed
......@@ -200,6 +200,9 @@ class SendMail {
$mailConfig[SENDMAIL_TOKEN_BODY] = Support::wrapTag(SENDMAIL_HTML_TOKEN, $mailConfig[SENDMAIL_TOKEN_BODY]);
// At least HTML code cleaned by QNL2BR() is missing any '\r\n'. A typicall MTA will inject a line break every 1000 Characters -
// this might be in the middle of a word or URL. To prevent this, reinsert '\r\n' after each <br>.
// TinyMce or other potential applications delivers '<br />' instead of '<br>'
$mailConfig[SENDMAIL_TOKEN_BODY] = str_ireplace("<br />", "<br>", $mailConfig[SENDMAIL_TOKEN_BODY]);
// First normalize existing "<br>\r\n" to "<br>", than replace "<br>" by "<br>\r\n".
$mailConfig[SENDMAIL_TOKEN_BODY] = str_ireplace("<br>", "<br>\r\n",
str_ireplace("<br>\r\n", "<br>", $mailConfig[SENDMAIL_TOKEN_BODY]));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment