且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Java中取消对HTML字符实体的转义?

更新时间:2022-12-04 21:40:04

我使用了Apache Commons

I have used the Apache Commons StringEscapeUtils.unescapeHtml4() for this:

转义包含实体的字符串 转义到包含 实际的Unicode字符 对应于逃生.技术支持 HTML 4.0实体.

Unescapes a string containing entity escapes to a string containing the actual Unicode characters corresponding to the escapes. Supports HTML 4.0 entities.