diff options
author | Unknwon <u@gogs.io> | 2018-06-02 08:15:56 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-06-02 08:15:56 +0800 |
commit | e25fe22f9d6ce8a74ce205f9c1fae1c5506c2611 (patch) | |
tree | ee25cc4a2c1589b33060184fefc0ef73f716af90 /pkg/template/template.go | |
parent | bef7f6745c569ddbac41fc760411d9a891458ae0 (diff) |
pkg/template: fix NewLine2br return type to string
Diffstat (limited to 'pkg/template/template.go')
-rw-r--r-- | pkg/template/template.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/template/template.go b/pkg/template/template.go index 4ebc4007..7d0fb676 100644 --- a/pkg/template/template.go +++ b/pkg/template/template.go @@ -131,9 +131,9 @@ func Str2html(raw string) template.HTML { return template.HTML(markup.Sanitize(raw)) } -// Simple filter, converts newline symbols to <br> -func NewLine2br(raw string) template.HTML { - return template.HTML(strings.Replace(raw, "\n", "<br>", -1)) +// NewLine2br simply replaces "\n" to "<br>". +func NewLine2br(raw string) string { + return strings.Replace(raw, "\n", "<br>", -1) } func List(l *list.List) chan interface{} { |