com.plink.plextile.util
Class HTMLFilter

java.lang.Object
  extended by com.plink.plextile.util.HTMLFilter

public class HTMLFilter
extends java.lang.Object

HTML filter utility.


Constructor Summary
HTMLFilter()
           
 
Method Summary
static java.lang.String convertString(java.lang.String original)
          Convert any illegal characters into &char; representation.
static java.lang.String filter(java.lang.String message)
          Filter the specified message string for characters that are sensitive in HTML.
static java.lang.String getSafe(java.lang.String temp)
           
static java.lang.String getURLSafe(java.lang.String temp)
           
static java.lang.String reconvertString(java.lang.String original)
          re-convert string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLFilter

public HTMLFilter()
Method Detail

filter

public static java.lang.String filter(java.lang.String message)
Filter the specified message string for characters that are sensitive in HTML. This avoids potential attacks caused by including JavaScript codes in the request URL that is often reported in error messages.

Parameters:
message - The message string to be filtered

convertString

public static java.lang.String convertString(java.lang.String original)
Convert any illegal characters into &char; representation.


reconvertString

public static java.lang.String reconvertString(java.lang.String original)
re-convert string.


getURLSafe

public static java.lang.String getURLSafe(java.lang.String temp)

getSafe

public static java.lang.String getSafe(java.lang.String temp)