【发布时间】:2012-01-30 18:23:20
【问题描述】:
我正在使用清除不需要的 HTML 标记(例如 <script>)中的一些文本
String clean = Jsoup.clean(someInput, Whitelist.basicWithImages());
问题在于它用&aring; 替换了例如å(这给我带来了麻烦,因为它不是“纯xml”)。
例如
Jsoup.clean("hello å <script></script> world", Whitelist.basicWithImages())
产量
"hello å world"
但我愿意
"hello å world"
有没有简单的方法来实现这一点? (即比在结果中将&aring; 转换回å 更简单。)
【问题讨论】:
标签: java html jsoup html-entities