From 7119ab629dc75851b09d2b7fd1d1f141cc24f151 Mon Sep 17 00:00:00 2001 From: ronger Date: Thu, 26 May 2022 13:50:56 +0800 Subject: [PATCH] Update XssUtils.java --- src/main/java/com/rymcu/forest/util/XssUtils.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/rymcu/forest/util/XssUtils.java b/src/main/java/com/rymcu/forest/util/XssUtils.java index a8445a9..e102398 100644 --- a/src/main/java/com/rymcu/forest/util/XssUtils.java +++ b/src/main/java/com/rymcu/forest/util/XssUtils.java @@ -21,6 +21,7 @@ public class XssUtils { /** * 滤除content中的危险 HTML 代码, 主要是脚本代码, 滚动字幕代码以及脚本事件处理代码 + * * @param content 需要滤除的字符串 * @return 过滤的结果 */ @@ -49,8 +50,8 @@ public class XssUtils { } public static String filterHtmlCode(String content) { - if(StringUtils.isBlank(content)) { - return content; + if (StringUtils.isBlank(content)) { + return content; } // 拿到匹配的pre标签List List resultFindAll = ReUtil.findAll(REGEX_CODE, content, 0, new ArrayList<>()); @@ -100,5 +101,3 @@ public class XssUtils { } } - -