Class EscapeXmlReference
- java.lang.Object
-
- org.apache.velocity.app.event.implement.EscapeReference
-
- org.apache.velocity.app.event.implement.EscapeXmlReference
-
- All Implemented Interfaces:
EventHandler,ReferenceInsertionEventHandler,RuntimeServicesAware
public class EscapeXmlReference extends EscapeReference
Deprecated.impractical useEscape all XML entities, suitable for placing the output inside an XML (1.0) text node or attribute value.
Warning: escaping references this way, without knowing if they land inside plain text, inside an attribute value or elsewhere, is not usable in production.
- Since:
- 1.5
- Author:
- wglass
- See Also:
- StringEscapeUtils
-
-
Field Summary
-
Fields inherited from class org.apache.velocity.app.event.implement.EscapeReference
log
-
-
Constructor Summary
Constructors Constructor Description EscapeXmlReference()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Stringescape(Object text)Deprecated.Escape all XML entities.protected StringgetMatchAttribute()Deprecated.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 String escape(Object text)
Deprecated.Escape all XML entities.- Specified by:
escapein classEscapeReference- Parameters:
text-- Returns:
- An escaped String.
- See Also:
- StringEscapeUtils
-
getMatchAttribute
protected String getMatchAttribute()
Deprecated.Description copied from class:EscapeReferenceSpecify the configuration attribute that specifies the regular expression. Ideally should be in a formeventhandler.escape.XYZ.matchwhere
XYZis the type of escaping being done.- Specified by:
getMatchAttributein classEscapeReference- Returns:
- attribute "eventhandler.escape.xml.match"
-
-