com.atlassian.confluence.velocity.htmlsafe
Class HtmlAnnotationEscaper
java.lang.Object
com.atlassian.confluence.velocity.introspection.AnnotatedReferenceHandler
com.atlassian.confluence.velocity.htmlsafe.HtmlAnnotationEscaper
- All Implemented Interfaces:
- org.apache.velocity.app.event.EventHandler, org.apache.velocity.app.event.ReferenceInsertionEventHandler
public class HtmlAnnotationEscaper
- extends AnnotatedReferenceHandler
A ReferenceInsertionEventHandler
that HTML encodes any value not annotated
as being HtmlSafe.
It also excludes some references from escaping based on name:
- Those ending in "html"
- xHtmlContent
- body
Nested classes/interfaces inherited from interface org.apache.velocity.app.event.ReferenceInsertionEventHandler |
org.apache.velocity.app.event.ReferenceInsertionEventHandler.referenceInsertExecutor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HtmlAnnotationEscaper
public HtmlAnnotationEscaper()
annotatedValueInsert
protected Object annotatedValueInsert(String referenceName,
Object value,
Collection<Annotation> annotations)
- Description copied from class:
AnnotatedReferenceHandler
- Process a reference with a collection of annotations
- Specified by:
annotatedValueInsert
in class AnnotatedReferenceHandler
- Parameters:
referenceName
- name of the reference being insertedvalue
- unboxed reference valueannotations
- any annotations associated with the reference
- Returns:
- Final value to insert