Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/util/sanitize/safe.go
akuma06 205daea027 Finally services are nearly empty 👍
Moved api services. All validations are now in validator util and all upload functions are in upload util
2017-07-01 23:09:35 +02:00

16 lignes
282 o
Go

package sanitize
import (
"html"
"html/template"
)
// Safe : make un url safe
func Safe(s string) template.URL {
return template.URL(html.EscapeString(s))
}
// SafeText : make a string safe
func SafeText(s string) template.HTML {
return template.HTML(html.EscapeString(s))
}