-
Notifications
You must be signed in to change notification settings - Fork 27
Use regex to match badwords #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use regex to match badwords #24
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
==========================================
+ Coverage 39.02% 48.07% +9.05%
==========================================
Files 3 3
Lines 41 52 +11
==========================================
+ Hits 16 25 +9
- Misses 22 24 +2
Partials 3 3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a nit.
@nathanaelhoun thank you for this meaningful improvement. Do you mind fixing my nit comment, if you agree with it? Otherwise, LGTM. @DHaussermann will you have the cycles to test this, or should we consider the new unit tests sufficient? |
Yes, I can take a quick look once changes are completed. |
@levb Thanks! Agree with you, so I applied it. @DHaussermann You can test this :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and passed
- Regex match solves both issues as expected
- Can now filter words that contain a space like "bad word" with no impact on the individual word
- Tested basic ways of circumventing filter:
- add ! and other punctuation
- add dash or other special char at the end
- encase the word in a
comment block
- Users will no longer side-step the filter naturally by punctuating words
- No issues found.
LGTM!
Thanks @nathanaelhoun Much appreciated. You've added a huge amount of value by making this change!
Summary
Use regex to match badwords.
The regex is build on configuration change and then use for filter each post.
README.md
updatedTicket Link
Closes #20 and closes #22