0
0
mirror of https://github.com/rls-moe/nyx synced 2024-10-06 13:52:07 +02: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)
}