diff --git a/pigx-common/pigx-common-xss/src/main/java/com/pig4cloud/pigx/common/xss/utils/XssUtil.java b/pigx-common/pigx-common-xss/src/main/java/com/pig4cloud/pigx/common/xss/utils/XssUtil.java index 249c9ced8..4eb77d837 100644 --- a/pigx-common/pigx-common-xss/src/main/java/com/pig4cloud/pigx/common/xss/utils/XssUtil.java +++ b/pigx-common/pigx-common-xss/src/main/java/com/pig4cloud/pigx/common/xss/utils/XssUtil.java @@ -100,7 +100,7 @@ public class XssUtil { } @Override - protected boolean isSafeAttribute(String tagName, Element el, Attribute attr) { + public boolean isSafeAttribute(String tagName, Element el, Attribute attr) { // 不允许 javascript 开头的 src 和 href if ("src".equalsIgnoreCase(attr.getKey()) || "href".equalsIgnoreCase(attr.getKey())) { String value = attr.getValue();