|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectHtmlUtils
public class HtmlUtils
This class provides a set of static methods that provide HTML utility code.
Constructor Summary | |
---|---|
HtmlUtils()
|
Method Summary | |
---|---|
static String |
addParams(String url,
Map params,
String encoding)
Add parameters contained in the givem Map to the URL. |
static boolean |
containsEntity(String value)
Determine if the given value contains an HTML entity. |
static boolean |
containsHtml(String value)
Detect simple HTML contained inside of the given value string. |
static String |
escapeEscapes(String value)
Escape the escapes (") and (\\) with escapes. |
static void |
filter(String value,
AbstractRenderAppender result)
Filter the specified value for characters that are sensitive to HTML interpreters. |
static void |
filter(String value,
AbstractRenderAppender result,
boolean markupHTMLSpaceReturn)
Filter the specified string for characters that are sensitive to HTML interpreters, returning the string with these characters replaced by the corresponding character entities. |
static String |
legacyEscapeEscapes(String value)
Deprecated. use escapeEscapes(String) instead |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HtmlUtils()
Method Detail |
---|
public static boolean containsHtml(String value)
value
string.
value
- the value
true
if the string contains HTML; false
otherwise.public static void filter(String value, AbstractRenderAppender result)
markupHTMLSpaceReturn
set to false
.
value
- The String
value to be filtered and returned.result
- the AbstractRenderAppender
to which the results should be renderedpublic static void filter(String value, AbstractRenderAppender result, boolean markupHTMLSpaceReturn)
value
- The String
value to be filtered and returned.markupHTMLSpaceReturn
- convert space characters and return characters
to and <br /> marketup for html.result
- the AbstractRenderAppender
to which the results should be renderedpublic static String escapeEscapes(String value)
value
- the string to escape
public static String legacyEscapeEscapes(String value)
escapeEscapes(String)
instead
value
- the value
public static String addParams(String url, Map params, String encoding) throws JspException
Map
to the URL. This method can handle values of type
String
, String array, null, and Object
contained in the Map
. If the type
is an array, each of the items in the array will be added in-order onto the URL. Object
s in the
array will be added to the URL after calling Object.toString()
.
url
- the base URLparams
- the parameters to add to the URLencoding
- the encoding to use when encoding parameters onto the URL
JspException
public static boolean containsEntity(String value)
value
contains an HTML entity.
value
- the value to check for an entity
true
if the value contains an entity; false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |