1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-19 02:27:03 +00:00

Simple HTML sanitizer implementation

This commit is contained in:
James Hillyerd
2018-01-06 16:45:12 -08:00
parent dedd0eacff
commit 26c38b1148
6 changed files with 121 additions and 4 deletions

9
sanitize/html.go Normal file
View File

@@ -0,0 +1,9 @@
package sanitize
import "github.com/microcosm-cc/bluemonday"
func HTML(html string) (output string, err error) {
policy := bluemonday.UGCPolicy()
output = policy.Sanitize(html)
return
}