0
0
mirror of https://github.com/rls-moe/nyx synced 2024-11-14 22:12:24 +00:00
nyx/resources/text.go

13 lines
242 B
Go
Raw Normal View History

package resources
import (
"html/template"
"strings"
)
func OperateReplyText(unsafe string) template.HTML {
unsafe = template.HTMLEscapeString(unsafe)
unsafe = strings.Replace(unsafe, "\n", "<br />", -1)
return template.HTML(unsafe)
}