summaryrefslogtreecommitdiffstats
path: root/util/safe.go
blob: 69db2ab83341e58596f27b04a141e7da03db1375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package util

import (
	"html"
	"html/template"
)

func Safe(s string) template.URL {
	return template.URL(html.EscapeString(s))
}

func SafeText(s string) template.HTML {
	return template.HTML(html.EscapeString(s))
}