Skip to content
Snippets Groups Projects
Verified Commit c01f296d authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Move the comment about br-tag removal to the right place in parseValuesForEmail function

parent 509aac6c
No related branches found
No related tags found
No related merge requests found
......@@ -1064,7 +1064,6 @@ class MailTemplateService {
empty($overwrittenEmailBody) ? $templateContent : $overwrittenEmailBody
);
// insert <br> tags, but replace every instance of three or more successive breaks with just two.
$emailBody = $emailView->render();
if ($emailBody === NULL) {
// Render function from StandaloneView CAN return null in some instances. We need to catch that case,
......@@ -1072,6 +1071,7 @@ class MailTemplateService {
$emailBody = '';
}
// insert <br> tags, but replace every instance of three or more successive breaks with just two.
if ($template->getRenderWithNl2br()) {
$emailBody = nl2br($emailBody);
$emailBody = preg_replace('/(<br[\s]?[\/]?>[\s]*){3,}/', '<br><br>', $emailBody);
......
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