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