无关风月
2 天以前 88f2a615a6c547adfd992334f42d7cd4aea8d55b
ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java
@@ -153,15 +153,15 @@
        return tmp.toString();
    }
    public static void main(String[] args)
    {
        String html = "<script>alert(1);</script>";
        String escape = EscapeUtil.escape(html);
        // String html = "<scr<script>ipt>alert(\"XSS\")</scr<script>ipt>";
        // String html = "<123";
        // String html = "123>";
        System.out.println("clean: " + EscapeUtil.clean(html));
        System.out.println("escape: " + escape);
        System.out.println("unescape: " + EscapeUtil.unescape(escape));
    }
//    public static void main(String[] args)
//    {
//        String html = "<script>alert(1);</script>";
//        String escape = EscapeUtil.escape(html);
//        // String html = "<scr<script>ipt>alert(\"XSS\")</scr<script>ipt>";
//        // String html = "<123";
//        // String html = "123>";
//        System.out.println("clean: " + EscapeUtil.clean(html));
//        System.out.println("escape: " + escape);
//        System.out.println("unescape: " + EscapeUtil.unescape(escape));
//    }
}