OOP FormGenerator Version 2.1

com.oopreserch.web
Class EscapeForHdml

java.lang.Object
  |
  +--com.oopreserch.web.EscapeForHdml
All Implemented Interfaces:
FormValueEscaper

public class EscapeForHdml
extends java.lang.Object
implements FormValueEscaper

The implementation of FormValueEscaper interface. Replace the special characters with the escaped ones.

If the String with the special characters (such as < or >) is inserted into the HDML tags, the concatenated String will be invalid as the HDML tags. To avoid this kind of problems, the String should be escaped before it is inserted into the HDML tags.

This class replaces the special characters for HDML. The table below lists the special characters and their corresponding escaped characters:

Original Character Escaped Character
< &lt;
> &gt;
& &amp;
" &quot;
$ &dol;


The implementations for HTML, WML and XML are also included in this package. They are:
All the available implementations of this interface must be defined in: In this property resource file, the value is the fully qualified class name of each implementation. The corresponding key is the arbitrary String, and you can specify it as the value of escape.type attribute in d.value element in the XML. For details about this property resource file, please look into FormValueEscaperFactory.

Author:
Jun Inamori

Constructor Summary
EscapeForHdml()
           
 
Method Summary
 java.lang.String getEscaped(java.lang.String org)
          Escape the special characters for HDML.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscapeForHdml

public EscapeForHdml()
Method Detail

getEscaped

public java.lang.String getEscaped(java.lang.String org)
Escape the special characters for HDML.
Specified by:
getEscaped in interface FormValueEscaper
Parameters:
org - The original String
Returns:
The escaped String

OOP FormGenerator Version 2.1

ALL CONTENTS COPYRIGHT 2002, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.