public class Escape extends Object
| Constructor and Description |
|---|
Escape() |
| Modifier and Type | Method and Description |
|---|---|
static String |
htmlElementContent(String content)
Escape content for use in HTML.
|
static String |
htmlElementContext(Object obj)
Convert the object to a string via
Object.toString() and HTML
escape the resulting string for use in HTML content. |
static String |
xml(String content)
Escape content for use in XML.
|
static String |
xml(String ifNull,
boolean escapeCRLF,
String content)
Escape content for use in XML.
|
static String |
xml(String ifNull,
String content)
Escape content for use in XML.
|
public static String htmlElementContent(String content)
content - The content to escapenull if the content was
nullpublic static String htmlElementContext(Object obj)
Object.toString() and HTML
escape the resulting string for use in HTML content.obj - The object to convert to String and then escape"?" if obj is
nullpublic static String xml(String content)
content - The content to escapenull if the content was
nullpublic static String xml(String ifNull, String content)
ifNull - The value to return if content is nullcontent - The content to escapeifNull if the
content was nullpublic static String xml(String ifNull, boolean escapeCRLF, String content)
ifNull - The value to return if content is nullescapeCRLF - Should CR and LF also be escaped?content - The content to escapenullCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.