mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fix for newlines in email templates
This commit is contained in:
parent
c401947997
commit
64a92bbc2e
@ -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…
Reference in New Issue
Block a user