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.2k stars 175 forks source link

TokenReader for pre-sanitization transformations #61

Open jhillyerd opened 6 years ago

jhillyerd commented 6 years ago

Allows a chain of TokenReaders to manipulate the html.Token stream prior to bluemonday sanitizing it.

Closes #58

jhillyerd commented 6 years ago

Please note this is a prototype, waiting for feedback here or in #58 before adding more docs & tests.