Merge pull request #5174 from sbwalker/dev
notifications should only convert line breaks to HTML for plain text messages
This commit is contained in:
commit
e4ece3e0dc
@ -130,7 +130,12 @@ namespace Oqtane.Infrastructure
|
||||
mailMessage.Subject = notification.Subject;
|
||||
|
||||
//body
|
||||
mailMessage.Body = notification.Body.Replace("\n", "<br />");
|
||||
mailMessage.Body = notification.Body;
|
||||
if (!mailMessage.Body.Contains("<") || !mailMessage.Body.Contains(">"))
|
||||
{
|
||||
// plain text messages should convert line breaks to HTML tags to preserve formatting
|
||||
mailMessage.Body = mailMessage.Body.Replace("\n", "<br />");
|
||||
}
|
||||
|
||||
// encoding
|
||||
mailMessage.SubjectEncoding = System.Text.Encoding.UTF8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user