public class Escape
extends java.lang.Object
Constructor and Description |
---|
Escape() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
htmlElementContent(java.lang.String content)
Escape content for use in HTML.
|
static java.lang.String |
htmlElementContext(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 |
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
null
public static java.lang.String htmlElementContext(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
null
public static java.lang.String xml(java.lang.String content)
content
- The content to escapenull
if the content was
null
public static java.lang.String xml(java.lang.String ifNull, java.lang.String content)
ifNull
- The value to return if content is null
content
- The content to escapeifNull
if the
content was null
public static java.lang.String xml(java.lang.String ifNull, boolean escapeCRLF, java.lang.String content)
ifNull
- The value to return if content is null
escapeCRLF
- Should CR and LF also be escaped?content
- The content to escapenull
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.