public final class PossibleIncorrectHtmlEncodingEventHandler extends AnnotatedReferenceHandler implements org.apache.velocity.util.ContextAware
Reference insertion handler to be used before the HtmlAnnotationEscaper
.
This handler will log warnings whenever a value that hasn't been marked as HtmlSafe contains data that looks like HTML.
As this handler is ContextAware
it is not thread safe and should not be reused across multiple threads.
Constructor and Description |
---|
PossibleIncorrectHtmlEncodingEventHandler() |
Modifier and Type | Method and Description |
---|---|
protected Object |
annotatedValueInsert(String referenceName,
Object value,
Collection<Annotation> annotations)
Process a reference with a collection of annotations
|
static boolean |
isLoggingEnabled() |
void |
setContext(org.apache.velocity.context.Context context) |
referenceInsert
public PossibleIncorrectHtmlEncodingEventHandler()
public static boolean isLoggingEnabled()
protected Object annotatedValueInsert(String referenceName, Object value, Collection<Annotation> annotations)
AnnotatedReferenceHandler
annotatedValueInsert
in class AnnotatedReferenceHandler
referenceName
- name of the reference being insertedvalue
- unboxed reference valueannotations
- any annotations associated with the referencepublic void setContext(org.apache.velocity.context.Context context)
setContext
in interface org.apache.velocity.util.ContextAware
Copyright © 2003–2015 Atlassian. All rights reserved.