|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evanmclean.evlib.escape.EscHtml
public final class EscHtml
Performs character escaping suitable for HTML output.
In general, if you pass a null
in, you'll get a
null
out. Otherwise, you'll get the Object.toString()
value of the object you pass in, escaped appropriately.
Method Summary | |
---|---|
String |
attr(Object obj)
Performs escaping for an HTML attribute. |
String |
comment(Object obj)
Performs escaping for an HTML comment. |
String |
text(Object obj)
Performs escaping for general HTML text. |
String |
textbr(Object obj)
Performs escaping for general HTML text, and also inserts a <br> or <br/> as appropriate before
each new line. |
String |
textbr(Object obj,
boolean replace)
Performs escaping for general HTML text, and also inserts or replaces a <br> or <br/> as appropriate before
each new line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String attr(Object obj)
obj
-
null
if obj
was null
.public String comment(Object obj)
obj
-
null
if obj
was null
.public String text(Object obj)
obj
-
null
if obj
was null
.public String textbr(Object obj)
Performs escaping for general HTML text, and also inserts a
<br>
or <br/>
as appropriate before
each new line.
A newline is one of:
\r
\n
\r\n
obj
-
null
if obj
was null
.public String textbr(Object obj, boolean replace)
Performs escaping for general HTML text, and also inserts or replaces a
<br>
or <br/>
as appropriate before
each new line.
A newline is one of:
\r
\n
\r\n
obj
- replace
- If true
then replace the newline character(s), else
just insert the element before it.
null
if obj
was null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |