HTMLPurifier 4.4.0
HTMLPurifier_URIFilter Class Reference

Chainable filters for custom URI processing. More...

Inheritance diagram for HTMLPurifier_URIFilter:
HTMLPurifier_URIFilter_DisableExternal HTMLPurifier_URIFilter_DisableExternal HTMLPurifier_URIFilter_DisableResources HTMLPurifier_URIFilter_DisableResources HTMLPurifier_URIFilter_HostBlacklist HTMLPurifier_URIFilter_HostBlacklist HTMLPurifier_URIFilter_MakeAbsolute HTMLPurifier_URIFilter_MakeAbsolute HTMLPurifier_URIFilter_Munge HTMLPurifier_URIFilter_Munge HTMLPurifier_URIFilter_SafeIframe HTMLPurifier_URIFilter_SafeIframe

List of all members.

Public Member Functions

 prepare ($config)
 Performs initialization for the filter.
 filter (&$uri, $config, $context)
 Filter a URI object.
 prepare ($config)
 Performs initialization for the filter.
 filter (&$uri, $config, $context)
 Filter a URI object.

Public Attributes

 $name
 Unique identifier of filter.
 $post = false
 True if this filter should be run after scheme validation.
 $always_load = false
 True if this filter should always be loaded (this permits a filter to be named Foo without the corresponding URI.Foo directive existing.)

Detailed Description

Chainable filters for custom URI processing.

These filters can perform custom actions on a URI filter object, including transformation or blacklisting. A filter named Foo must have a corresponding configuration directive URI.Foo, unless always_load is specified to be true.

The following contexts may be available while URIFilters are being processed:

  • EmbeddedURI: true if URI is an embedded resource that will be loaded automatically on page load
  • CurrentToken: a reference to the token that is currently being processed
  • CurrentAttr: the name of the attribute that is currently being processed
  • CurrentCSSProperty: the name of the CSS property that is currently being processed (if applicable)
Warning:
This filter is called before scheme object validation occurs. Make sure, if you require a specific scheme object, you you check that it exists. This allows filters to convert proprietary URI schemes into regular ones.

Definition at line 28 of file URIFilter.php.


Member Function Documentation

HTMLPurifier_URIFilter::filter ( &$  uri,
config,
context 
) [abstract]
HTMLPurifier_URIFilter::filter ( &$  uri,
config,
context 
) [abstract]
HTMLPurifier_URIFilter::prepare ( config)

Member Data Documentation

HTMLPurifier_URIFilter::$always_load = false

True if this filter should always be loaded (this permits a filter to be named Foo without the corresponding URI.Foo directive existing.)

Reimplemented in HTMLPurifier_URIFilter_SafeIframe.

Definition at line 46 of file URIFilter.php.

HTMLPurifier_URIFilter::$post = false

True if this filter should be run after scheme validation.

Reimplemented in HTMLPurifier_URIFilter_Munge.

Definition at line 39 of file URIFilter.php.


The documentation for this class was generated from the following files: