htmlspecialchars_decode 旧城等待, 2022-11-03 05:45 239阅读 0赞 > -------------------- # 1 htmlspecialchars\_decode # ## 1.1 PHP演示 ## > * [https://www.php.net/manual/zh/function.htmlspecialchars-decode.php][https_www.php.net_manual_zh_function.htmlspecialchars-decode.php] > * [https://www.jb51.net/article/157130.htm][https_www.jb51.net_article_157130.htm] ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNzk0OTcz_size_16_color_FFFFFF_t_70][] ## 1.2 java对应的实现 ## String str = "This is some <b>bold</b> text."; //org.springframework.web.util.HtmlUtils System.out.println(HtmlUtils.htmlUnescape(str)); //org.apache.commons.lang.StringEscapeUtils System.out.println(StringEscapeUtils.unescapeHtml(str)); ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNzk0OTcz_size_16_color_FFFFFF_t_70 1][] -------------------- 2 String str = "This is some <b>bold</b> text."; //org.springframework.web.util.HtmlUtils System.out.println(HtmlUtils.htmlEscape(str)); //org.apache.commons.lang.StringEscapeUtils System.out.println(StringEscapeUtils.escapeHtml(str)); ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNzk0OTcz_size_16_color_FFFFFF_t_70 2][] > [https://blog.csdn.net/qingfengmuzhu1993/article/details/82459747][https_blog.csdn.net_qingfengmuzhu1993_article_details_82459747] [https_www.php.net_manual_zh_function.htmlspecialchars-decode.php]: https://www.php.net/manual/zh/function.htmlspecialchars-decode.php [https_www.jb51.net_article_157130.htm]: https://www.jb51.net/article/157130.htm [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNzk0OTcz_size_16_color_FFFFFF_t_70]: /images/20221024/214d1390e2954b23b815041836d6e8fa.png [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNzk0OTcz_size_16_color_FFFFFF_t_70 1]: /images/20221024/40c84d633234408685b90fba58f9dc74.png [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNzk0OTcz_size_16_color_FFFFFF_t_70 2]: /images/20221024/63f03945fd784d0ca4edbb75b0273759.png [https_blog.csdn.net_qingfengmuzhu1993_article_details_82459747]: https://blog.csdn.net/qingfengmuzhu1993/article/details/82459747
还没有评论,来说两句吧...