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:
9
sanitize/html.go
Normal file
9
sanitize/html.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user