07-08
14
关于StringEscapeUtils介绍
作者:Java伴侣 日期:2007-08-14
StringEscapeUtils来做HTML的转化,介绍如下:
引用内容
escapeHtml
public static String escapeHtml(String str)
Escapes the characters in a String using HTML entities.
For example:
"bread" & "butter"
becomes:
"bread" & "butter".
Supports all known HTML 4.0 entities, including funky accents.
Parameters:
str - the String to escape, may be null
Returns:
a new escaped String, null if null string input
See Also:
unescapeHtml(String), ISO Entities, HTML 3.2 Character Entities for ISO Latin-1, HTML 4.0 Character entity references, HTML 4.01 Character References, HTML 4.01 Code positions
public static String escapeHtml(String str)
Escapes the characters in a String using HTML entities.
For example:
"bread" & "butter"
becomes:
"bread" & "butter".
Supports all known HTML 4.0 entities, including funky accents.
Parameters:
str - the String to escape, may be null
Returns:
a new escaped String, null if null string input
See Also:
unescapeHtml(String), ISO Entities, HTML 3.2 Character Entities for ISO Latin-1, HTML 4.0 Character entity references, HTML 4.01 Character References, HTML 4.01 Code positions
评论: 0 | 引用: 0 | 查看次数: 1094
发表评论