org.apache.beehive.netui.tags
Class HtmlUtils

Object
  extended by HtmlUtils

public class HtmlUtils
extends Object

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)
           
static boolean containsEntity(String value)
          This method will determine if the value passed in contains an entity.
static String escapeEscapes(String val)
           
static String filter(String value)
          Filter the specified value for characters that are sensitive to HTML interpreters.
static String filter(String value, 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.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlUtils

public HtmlUtils()
Method Detail

filter

public static String filter(String value)
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.
Returns:
a new String value containing HTML entities

filter

public static String filter(String value,
                            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.

Parameters:
value - The String value to be filtered and returned.
markupHTMLSpaceReturn - convert space characters and return characters to &nbsp; and <br /> marketup for html.
Returns:
a new String value containing HTML entities

escapeEscapes

public static String escapeEscapes(String val)

addParams

public static String addParams(String url,
                               Map params,
                               String encoding)
                        throws JspException
Parameters:
url -
params -
encoding -
Returns:
String
Throws:
JspException

containsEntity

public static boolean containsEntity(String value)
This method will determine if the value passed in contains an entity.

Returns:
boolean