org.apache.velocity.app.event.implement
Class EscapeHtmlReference

java.lang.Object
  extended by org.apache.velocity.app.event.implement.EscapeReference
      extended by org.apache.velocity.app.event.implement.EscapeHtmlReference
All Implemented Interfaces:
EventHandler, ReferenceInsertionEventHandler, RuntimeServicesAware

public class EscapeHtmlReference
extends EscapeReference

Escape all HTML entities.

Since:
1.5
Author:
wglass
See Also:
StringEscapeUtils

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.ReferenceInsertionEventHandler
ReferenceInsertionEventHandler.referenceInsertExecutor
 
Constructor Summary
EscapeHtmlReference()
           
 
Method Summary
protected  String escape(Object text)
          Escape all HTML entities.
protected  String getMatchAttribute()
          Specify the configuration attribute that specifies the regular expression.
 
Methods inherited from class org.apache.velocity.app.event.implement.EscapeReference
getRuntimeServices, referenceInsert, setRuntimeServices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscapeHtmlReference

public EscapeHtmlReference()
Method Detail

escape

protected String escape(Object text)
Escape all HTML entities.

Specified by:
escape in class EscapeReference
Parameters:
text -
Returns:
An escaped String.
See Also:
StringEscapeUtils

getMatchAttribute

protected String getMatchAttribute()
Description copied from class: EscapeReference
Specify the configuration attribute that specifies the regular expression. Ideally should be in a form
eventhandler.escape.XYZ.match

where XYZ is the type of escaping being done.

Specified by:
getMatchAttribute in class EscapeReference
Returns:
attribute "eventhandler.escape.html.match"


Copyright © 2000-2010 The Apache Software Foundation. All Rights Reserved.