【fix sonar】StrAttackFilter文件
This commit is contained in:
+4
@@ -9,6 +9,10 @@ import java.util.regex.PatternSyntaxException;
|
|||||||
*/
|
*/
|
||||||
public class StrAttackFilter {
|
public class StrAttackFilter {
|
||||||
|
|
||||||
|
private StrAttackFilter(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static String filter(String str) throws PatternSyntaxException {
|
public static String filter(String str) throws PatternSyntaxException {
|
||||||
// 清除掉所有特殊字符
|
// 清除掉所有特殊字符
|
||||||
String regEx = "[`_《》~!@#$%^&*()+=|{}':;',\\[\\].<>?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]";
|
String regEx = "[`_《》~!@#$%^&*()+=|{}':;',\\[\\].<>?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]";
|
||||||
|
|||||||
Reference in New Issue
Block a user