【fix sonar】XSSUtils文件

This commit is contained in:
梁琦涛
2023-04-04 10:44:32 +08:00
parent 6db0d0eb7d
commit be5773bd71
@@ -35,8 +35,9 @@ public class XSSUtils {
value = scriptPattern.matcher(value).replaceAll("");
scriptPattern = Pattern.compile("onload(.*?)=", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
value = scriptPattern.matcher(value).replaceAll("");
return HtmlUtils.htmlEscape(value);
}
return HtmlUtils.htmlEscape(value);
return null;
}
public static void main(String[] args) {