mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 17:53:10 +00:00
Fix issue email formatting. Addresses #2331
This commit is contained in:
parent
2fdf8fc938
commit
0f1b26ed1e
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@ package mailer
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"gopkg.in/macaron.v1"
|
"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)
|
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>.",
|
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)
|
setting.AppUrl, owner.Name, repo.Name, issue.Index)
|
||||||
msg := NewMessage(tos, subject, content)
|
msg := NewMessage(tos, subject, content)
|
||||||
msg.Info = fmt.Sprintf("Subject: %s, issue notify", subject)
|
msg.Info = fmt.Sprintf("Subject: %s, issue notify", subject)
|
||||||
|
|
Loading…
Reference in a new issue