【fix sonar】StrAttackFilter文件

This commit is contained in:
梁琦涛
2023-03-03 15:05:35 +08:00
parent 276aac5d23
commit 72eca029ad
@@ -9,6 +9,10 @@ import java.util.regex.PatternSyntaxException;
*/
public class StrAttackFilter {
private StrAttackFilter(){
}
public static String filter(String str) throws PatternSyntaxException {
// 清除掉所有特殊字符
String regEx = "[`_《》~!@#$%^&*()+=|{}':;',\\[\\].<>?~@#¥%……&*()——+|{}【】‘;:”“’。,、?]";