fix(banned words): fix partial matching of words containing diacritic… (#12444)
* fix(banned words): fix partial matching of words containing diacritics against banned words list (#12309) * lint: remove whitespace to fix error * test: add test to prevent partial matching of words containing diacritics against banned words list (#12309) * doc: add link to Unicode table of diacritical marks (#12309)
This commit is contained in:
committed by
GitHub
parent
ad51675ac6
commit
f2bcdd21de
@@ -8,5 +8,10 @@ describe('stringUtils', () => {
|
||||
const matches = getMatchesByWordArray(message, bannedWords);
|
||||
expect(matches.length).to.equal(bannedWords.length);
|
||||
});
|
||||
it('doesn\'t flag names with accented characters', () => {
|
||||
const name = 'TESTPLACEHOLDERSWEARWORDHEREé';
|
||||
const matches = getMatchesByWordArray(name, bannedWords);
|
||||
expect(matches.length).to.equal(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user