屏蔽修改

back_recharge
duhui 2023-01-06 17:35:37 +08:00
parent 97edfd2e2a
commit c041d3dcdf
2 changed files with 3 additions and 4 deletions

View File

@ -65,8 +65,7 @@ public class SensitivewordFilter {
if (rPCClient == null) {
return null;
}
Set<String> sensitiveWord = rPCClient.getClient().getSensitiveWord(txt, matchType);
return sensitiveWord;
return rPCClient.getClient().getSensitiveWord(txt, matchType);
} catch (Exception e) {
LOGGER.info("getSensitiveWord callback=>",e);
return null;

View File

@ -58,8 +58,8 @@ public class ShieldedWordUtils {
// String regEx = "[^a-zA-Z0-9]";
// 清除掉所有特殊字符
String regEx="[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~@#¥%……&*()——+|{}【】‘;:”“’。,、? \\\\]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(content);
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(content);
return m.replaceAll("").replaceAll(" ","");
}
}