Fix for newlines in email templates
This commit is contained in:
parent
c401947997
commit
64a92bbc2e
1 changed files with 4 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ trait SendsEmails
|
|||
$value = $this->$field;
|
||||
|
||||
if ($value) {
|
||||
return $value;
|
||||
return preg_replace("/\r\n|\r|\n/", ' ', $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ trait SendsEmails
|
|||
}
|
||||
|
||||
if ($message) {
|
||||
$template .= "$message<p/>\r\n\r\n";
|
||||
$template .= "$message<p/>";
|
||||
}
|
||||
|
||||
return $template . '$footer';
|
||||
|
|
@ -91,6 +91,8 @@ trait SendsEmails
|
|||
$template = $this->getDefaultEmailTemplate($entityType, $message);
|
||||
}
|
||||
|
||||
$template = preg_replace("/\r\n|\r|\n/", ' ', $template);
|
||||
|
||||
// <br/> is causing page breaks with the email designs
|
||||
return str_replace('/>', ' />', $template);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue