|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.interface21.web.util.HtmlUtils
Utility class for HTML escaping and unescaping. Based on code from com.purpletech.util.Utils, written by Alex Chaffee.
Reference: http://hotwired.lycos.com/webmonkey/reference/special_characters/
| Constructor Summary | |
HtmlUtils()
|
|
| Method Summary | |
static java.lang.String |
htmlEscape(java.lang.String source)
Turns funky characters into HTML entity equivalents. E.g. |
static java.lang.String |
htmlUnescape(java.lang.String source)
Reverses htmlEscape. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HtmlUtils()
| Method Detail |
public static java.lang.String htmlEscape(java.lang.String source)
E.g. "bread" & "butter" => "bread" & "butter"
Update: supports nearly all HTML entities, including funky accents. See the source code for more detail.
public static java.lang.String htmlUnescape(java.lang.String source)
|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||