microcosm-cc / bluemonday

bluemonday: a fast golang HTML sanitizer (inspired by the OWASP Java HTML Sanitizer) to scrub user generated content of XSS
https://github.com/microcosm-cc/bluemonday
BSD 3-Clause "New" or "Revised" License
3.12k stars 176 forks source link

Allow DataUri for an audio Element #141

Closed aoshi321 closed 2 years ago

aoshi321 commented 2 years ago

Hi

is it possible to allow a dataUri for an audio element. I'm currently doing?

p := bluemonday.NewPolicy()
p.AllowElements("audio")
p.AllowAttrs("src").OnElements("audio")

The src is being stripped out.