Class EncodeURIFilter

All Implemented Interfaces:

public class EncodeURIFilter extends Object implements Filter

Encodes the URL to either RFC 3986 URI US-ASCII format or RFC 3987 IRI Unicode format. If the URL begins with javascript:, cid:, or data:, (case-insensitive) it is not altered. Canonical URLs are always encoded to US-ASCII format.

IRI support is disabled by default, and only recommended for development or internal systems. IRI may result in slightly smaller output, and more readable HTML source, but for interoperability should be off in production systems.

RFC 7231 - 7.1.2. Location refers only to RFC 3986 URI for URI-reference, thus redirects are always formatted as RFC 3986 URI.

This should be used for both the DispatcherType.REQUEST and DispatcherType.ERROR dispatchers.