Closed malini closed 1 hour ago
i put it as beta v2 because it would be best to have this before we have non-mozillian users
I analyzed the code base and found the following place where a profanity filter might make sense:
/dashboard
: schedule name/settings/account
: username, display name/setup
(FTUE): full name, username, schedule name@malini Are those places enough for beta for now? Is a frontend filter sufficient for now?
@devmount yup, thanks. And I didn't think of schedule name, so thank you! that's a great suggestion.
Ok this was more pain than expected 😅 How hard can it be to create a working lib that provides filtering against a fixed set of words 🙈
So I went with the 2nd one for now, since it was the only one that worked anyway. If we find another more suitable lib that contains other languages as well, we can easily switch.
Good news: The maintainer of https://github.com/2Toad/Profanity is quite active and directly responded to my feature request for multiple languages. So we might just keep that for now.
Is your feature request related to a problem? Please describe. We do not filter user's shortUrls and we should check them against a list of known profanity/etc, so we do not allow harmful language.
Describe the solution you'd like Determine if Mozilla maintains a profanity filter somewhere we can leverage, or find a suitable alternative (maybe https://github.com/coffee-and-fun/google-profanity-words ?
When users select their username/shortUrls/etc, we should run their input through the filter before accepting it.