-
Notifications
You must be signed in to change notification settings - Fork 675
英文全匹配配置未生效 #69
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
Comments
已解决,问题原因是全匹配1位的话不好用 就像cp是敏感词,cpm还是会校验为敏感词,但是cp后面跟两位以上就不会被校验敏感词 public class EnglishWordMatch extends AbstractWordResultCondition {
} |
感谢提醒,v0.19.1 版本已修正。后续这种优化可以提 PR,我来统一合并。 |
我的配置类是, 采用黑白名单的方式控制敏感词, 只用到了黑名单, 黑名单里 全是英文的, 开启了这个全匹配配置
后发现还是不生效, 比如 黑名单里有cp, 现在cpm是合法的,但还是被校验住了,不知道咋回事, 我用的版本是 0.14.0
@bean
public SensitiveWordBs sensitiveWordBs() {
return SensitiveWordBs.newInstance()
.wordAllow(WordAllows.chains(WordAllows.defaults(), myDdWordAllow))
.wordDeny(myDdWordDeny)
//英文全匹配
.wordResultCondition(WordResultConditions.englishWordMatch())
// 各种其他配置
//不忽略全角和半角 中英文括号
.ignoreWidth(false)
.init();
}
The text was updated successfully, but these errors were encountered: