Albirew/nyaa-pantsu
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/utils/sanitize/safe.go

17 lignes
282 B
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))
}