Class ConfluenceHtmlEntityEncodingPolicy

  • All Implemented Interfaces:
    com.atlassian.velocity.htmlsafe.ReferenceInsertionPolicy

    @Deprecated(forRemoval=true)
    public final class ConfluenceHtmlEntityEncodingPolicy
    extends Object
    implements com.atlassian.velocity.htmlsafe.ReferenceInsertionPolicy
    Deprecated, for removal: This API element is subject to removal in a future version.
    This reference insertion policy implements the strategy used by Confluence to determine whether automatic HTML entity encoding should be applied to any particular context or template used by the Velocity rendering system.
    • Constructor Detail

      • ConfluenceHtmlEntityEncodingPolicy

        public ConfluenceHtmlEntityEncodingPolicy​(TemplateHtmlEntityEncodingPolicy templateEncodingPolicy)
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • shouldAutoEncode

        public boolean shouldAutoEncode​(org.apache.velocity.context.Context context,
                                        @Nullable org.apache.velocity.Template template)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Decides whether autoencoding should be enabled for a given context and optional template. We currently autoencode:
        Parameters:
        context - a context which will be handled specially if it is an OutputMimeTypeAwareContext or is an InternalContextAdapter containing an OutputMimeTypeAwareContext.
        template - a nullable template which will be handled specially if it's a HtmlSafeVelocityTemplate
        Returns:
        true if autoencoding should be enabled for this context and template.
      • shouldAutoEncode

        public boolean shouldAutoEncode​(org.apache.velocity.context.Context context)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getReferenceInsertionEventHandler

        public org.apache.velocity.app.event.ReferenceInsertionEventHandler getReferenceInsertionEventHandler​(org.apache.velocity.context.Context context)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getReferenceInsertionEventHandler in interface com.atlassian.velocity.htmlsafe.ReferenceInsertionPolicy