Class EscapeHtmlReference
- java.lang.Object
-
- org.apache.velocity.app.event.implement.EscapeReference
-
- 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
Constructors Constructor Description EscapeHtmlReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
escape(java.lang.Object text)
Escape all HTML entities.protected java.lang.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
-
-
-
-
Method Detail
-
escape
protected java.lang.String escape(java.lang.Object text)
Escape all HTML entities.- Specified by:
escape
in classEscapeReference
- Parameters:
text
-- Returns:
- An escaped String.
- See Also:
- StringEscapeUtils
-
getMatchAttribute
protected java.lang.String getMatchAttribute()
Description copied from class:EscapeReference
Specify the configuration attribute that specifies the regular expression. Ideally should be in a formeventhandler.escape.XYZ.match
where
XYZ
is the type of escaping being done.- Specified by:
getMatchAttribute
in classEscapeReference
- Returns:
- attribute "eventhandler.escape.html.match"
-
-