| java.lang.Object org.apache.beehive.netui.tags.HtmlUtils
HtmlUtils | public class HtmlUtils (Code) | | This class provides a set of static methods that provide HTML utility code.
|
Method Summary | |
public static String | addParams(String url, Map params, String encoding) Add parameters contained in the givem
Map to the URL. | public static boolean | containsEntity(String value) Determine if the given value contains an HTML entity. | public static boolean | containsHtml(String value) Detect simple HTML contained inside of the given value string. | public static String | escapeEscapes(String value) Escape the escapes (") and (\\) with escapes. | public static void | filter(String value, AbstractRenderAppender result) Filter the specified value for characters that are sensitive to
HTML interpreters. | public 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. | public static String | legacyEscapeEscapes(String value) Deprecated method using an old algorithm to escape escapes. |
addParams | public static String addParams(String url, Map params, String encoding) throws JspException(Code) | | Add parameters contained in the givem
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 .
Parameters: url - the base URL Parameters: params - the parameters to add to the URL Parameters: encoding - the encoding to use when encoding parameters onto the URL the URL created by adding the parameters onto the base URL string throws: JspException - |
containsEntity | public static boolean containsEntity(String value)(Code) | | Determine if the given value contains an HTML entity.
Parameters: value - the value to check for an entity true if the value contains an entity; false otherwise. |
containsHtml | public static boolean containsHtml(String value)(Code) | | Detect simple HTML contained inside of the given value string.
Parameters: value - the value true if the string contains HTML; false otherwise. |
escapeEscapes | public static String escapeEscapes(String value)(Code) | | Escape the escapes (") and (\\) with escapes. These characters will be replaced with
(") and (\\\\) respectively.
Parameters: value - the string to escape the escaped string |
filter | public static void filter(String value, AbstractRenderAppender result)(Code) | | Filter the specified value for characters that are sensitive to
HTML interpreters. It will return a string with these characters replaced
with HTML entities. This method calls the overloaded method with markupHTMLSpaceReturn
set to false .
Parameters: value - The String value to be filtered and returned. Parameters: result - the AbstractRenderAppender to which the results should be rendered |
filter | public static void filter(String value, AbstractRenderAppender result, boolean markupHTMLSpaceReturn)(Code) | | Filter the specified string for characters that are sensitive to
HTML interpreters, returning the string with these characters replaced
by the corresponding character entities.
Parameters: value - The String value to be filtered and returned. Parameters: markupHTMLSpaceReturn - convert space characters and return charactersto and <br /> marketup for html. Parameters: result - the AbstractRenderAppender to which the results should be rendered |
|
|