Commit 5fbea4d1 authored by Kevin von Spiczak's avatar Kevin von Spiczak
Browse files

Revert "Merge branch 'bugfix_347-NewLinesInMailLayouts' into 'master'"

This reverts commit 5b9ee9f1, reversing
changes made to bb6c3845.
parent 01616e43
......@@ -944,7 +944,10 @@ 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();
$emailBody = \nl2br($emailBody);
$emailBody = \preg_replace('/(<br[\s]?[\/]?>[\s]*){3,}/', '<br><br>', $emailBody);
$layout = $this->getLayoutSource($layoutId, $siteRootId);
$emailHTMLHead = '';
......@@ -952,10 +955,6 @@ class MailTemplateService {
$emailHTMLHead = $layout->getHeadContent();
$emailBody = \str_replace('###CONTENT###', $emailBody, $layout->getContent());
}
// insert <br> tags, but replace every instance of three or more successive breaks with just two.
$emailBody = \nl2br($emailBody);
$emailBody = \preg_replace('/(<br[\s]?[\/]?>[\s]*){3,}/', '<br><br>', $emailBody);
$this->mailBodyToSend = '<html><head>' . $emailHTMLHead . '</head><body>' . $emailBody . '</body></html>';
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment