97b3a1d7ea
Common is no more a thing Use of TorrentParam instead of SearchParam now Common structs for search are exported in utils/search/structs Util has been renamed utils
16 lignes
282 o
Go
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))
|
|
}
|