-
Notifications
You must be signed in to change notification settings - Fork 5
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
bug: grawlixCensorStrategy sometimes generates "@$$" #82
Labels
bug
Something isn't working
Comments
Interesting find (and a mildly unfortunate issue)! A PR to generate another random string (in a loop as needed) if |
8 tasks
eltoder
added a commit
to eltoder/obscenity
that referenced
this issue
Nov 29, 2024
In randomCharFromSetCensorStrategy(). This produces more interesting strings and avoids generating "@$$" as a side-effect. Fixes jo3-l#82
8 tasks
eltoder
added a commit
to eltoder/obscenity
that referenced
this issue
Dec 3, 2024
In randomCharFromSetCensorStrategy(). This produces more interesting strings and avoids generating "@$$" as a side-effect. Fixes jo3-l#82
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Censoring strategy should generate a replacement string that itself does not contain any profanity. However, since grawlixCensorStrategy returns a string of random characters that include "@" and "$", sometimes it generates "@$$", which is considered profanity by the default englishDataset/englishRecommendedTransformers matcher recommended in the guide.
Actual behavior
This causes TextCensor with the default settings to sometimes replace "ass" or "@$$" with "@$$".
Minimal reproducible example
Steps to reproduce
No response
Additional context
No response
Node.js version
v20
Obscenity version
v0.4.0
Priority
Terms
The text was updated successfully, but these errors were encountered: