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

How to disallow emoji?

ivanjaros opened this issue · comments

commented

I am not sure that is possible at all, let alone with bluemonday. Emojis are (I believe) indistinguishable from regular characters in many languages. Perhaps there is a specific unicode family that groups this and you can iterate over all of the runes in the text prior to sanitization and check the rune family and exclude them... but this is a task for you to do rather than for this library to do.