diff options
author | Unknwon <u@gogs.io> | 2016-02-18 16:19:23 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-18 16:19:23 -0500 |
commit | 736a46dff96430f4ee43e6a2eb1bccbccaa611d4 (patch) | |
tree | d434c74295b94ba2daca1d09ed10f85dccf76608 /modules | |
parent | 60896c66af07bf9de471bbd99795a3799b99076f (diff) | |
parent | 0f1b26ed1e7242c37a2c014e0a4c2955f266b3a0 (diff) | |
download | gitea-736a46dff96430f4ee43e6a2eb1bccbccaa611d4.tar.gz gitea-736a46dff96430f4ee43e6a2eb1bccbccaa611d4.zip |
Merge pull request #2659 from joshfng/fix-issue-email-format
Fix issue email formatting. Addresses #2331
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mailer/mail.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go index 456f850338..ca5618f1bc 100644 --- a/modules/mailer/mail.go +++ b/modules/mailer/mail.go @@ -7,6 +7,7 @@ package mailer import ( "fmt" "path" + "strings" "gopkg.in/macaron.v1" @@ -125,7 +126,7 @@ func SendIssueNotifyMail(u, owner *models.User, repo *models.Repository, issue * subject := fmt.Sprintf("[%s] %s (#%d)", repo.Name, issue.Name, issue.Index) content := fmt.Sprintf("%s<br>-<br> <a href=\"%s%s/%s/issues/%d\">View it on Gogs</a>.", - base.RenderSpecialLink([]byte(issue.Content), owner.Name+"/"+repo.Name, repo.ComposeMetas()), + base.RenderSpecialLink([]byte(strings.Replace(issue.Content, "\n", "<br>", -1)), owner.Name+"/"+repo.Name, repo.ComposeMetas()), setting.AppUrl, owner.Name, repo.Name, issue.Index) msg := NewMessage(tos, subject, content) msg.Info = fmt.Sprintf("Subject: %s, issue notify", subject) |