fix: Implemented whole word matching in ProfanityAnalyser class#81
Merged
JonPurvis merged 2 commits intopestphp:4.xfrom Sep 9, 2025
Merged
fix: Implemented whole word matching in ProfanityAnalyser class#81JonPurvis merged 2 commits intopestphp:4.xfrom
JonPurvis merged 2 commits intopestphp:4.xfrom
Conversation
Example in portuguese: 'Colar de pérola' would get incorrectly flagged as profanity because it contains the last 4 chars that is a bad word in pt_BR config.
Contributor
Author
|
Also one thing unrelated to this PR but I think could be removed is "sheet" from en config, because it is a common word for spreadsheet export right? |
Collaborator
|
Thanks for the contribution @gabrielrbarbosa Are you able to take a look at the failing static analysis checks please? Happy to merge this once resolved. |
Contributor
Author
|
@JonPurvis fixed style issue |
Collaborator
|
Thanks for sorting! Interesting that you mentioned sheet, I had that crop up on a project yesterday! I ended up just adding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example in portuguese:
'Colar de pérola' would get incorrectly flagged as profanity because it contains the last 4 chars that is a bad word in pt_BR config.
After this fix: PASS No profanity found in your application!