html 转义和反转义

Posted on 2020-06-28 19:18  zkx4213  阅读(169)  评论(0编辑  收藏  举报
public static void main(String[] args) {
// String html = "<img style=\"width: 100%; height: auto;\"><p>test</p>";

String temp = HtmlUtils.htmlEscape(html);
System.out.println(temp);
System.out.println(HtmlUtils.htmlUnescape(temp));

}

Copyright © 2024 zkx4213
Powered by .NET 8.0 on Kubernetes