microcosm-cc / bluemonday

bluemonday: a fast golang HTML sanitizer (inspired by the OWASP Java HTML Sanitizer) to scrub user generated content of XSS

Home Page:https://github.com/microcosm-cc/bluemonday

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I use bluemonday to remove certain links?

akfaew opened this issue · comments

I wish to remove links that have "unsubscribe" somewhere in the anchor or in the url. Is that possible?

commented

bluemonday doesn't support that... but you could use https://pkg.go.dev/golang.org/x/net/html directly to do this.