HTMLPurifier_URIScheme_data
extends HTMLPurifier_URIScheme
in package
Implements data: URI for base64 encoded images supported by GD.
Table of Contents
Properties
- $allowed_types : mixed
- $browsable : mixed
- Whether or not URIs of this scheme are locatable by a browser http and ftp are accessible, while mailto and news are not.
- $default_port : mixed
- Scheme's default port (integer). If an explicit port number is specified that coincides with the default port, it will be elided.
- $hierarchical : mixed
- Whether or not the URI always uses <hier_part>, resolves edge cases with making relative URIs absolute
- $may_omit_host : mixed
- Whether or not the URI may omit a hostname when the scheme is explicitly specified, ala file:///path/to/file. As of writing, 'file' is the only scheme that browsers support his properly.
- $secure : mixed
- Whether or not data transmitted over this scheme is encrypted.
Methods
- doValidate() : bool
- Validates the components of a URI for a specific scheme.
- muteErrorHandler() : mixed
- validate() : bool
- Public interface for validating components of a URI. Performs a bunch of default actions. Don't overload this method.
Properties
$allowed_types
public
mixed
$allowed_types
= array(
// you better write validation code for other types if you
// decide to allow them
'image/jpeg' => \true,
'image/gif' => \true,
'image/png' => \true,
)
Tags
$browsable
Whether or not URIs of this scheme are locatable by a browser http and ftp are accessible, while mailto and news are not.
public
mixed
$browsable
= \true
Tags
$default_port
Scheme's default port (integer). If an explicit port number is specified that coincides with the default port, it will be elided.
public
mixed
$default_port
= \null
Tags
$hierarchical
Whether or not the URI always uses <hier_part>, resolves edge cases with making relative URIs absolute
public
mixed
$hierarchical
= \false
Tags
$may_omit_host
Whether or not the URI may omit a hostname when the scheme is explicitly specified, ala file:///path/to/file. As of writing, 'file' is the only scheme that browsers support his properly.
public
mixed
$may_omit_host
= \true
Tags
$secure
Whether or not data transmitted over this scheme is encrypted.
public
mixed
$secure
= \false
https is secure, http is not.
Tags
Methods
doValidate()
Validates the components of a URI for a specific scheme.
public
doValidate(HTMLPurifier_URI &$uri, HTMLPurifier_Config $config, HTMLPurifier_Context $context) : bool
Parameters
- $uri : HTMLPurifier_URI
- $config : HTMLPurifier_Config
- $context : HTMLPurifier_Context
Return values
boolmuteErrorHandler()
public
muteErrorHandler(int $errno, string $errstr) : mixed
Parameters
- $errno : int
- $errstr : string
validate()
Public interface for validating components of a URI. Performs a bunch of default actions. Don't overload this method.
public
validate(HTMLPurifier_URI &$uri, HTMLPurifier_Config $config, HTMLPurifier_Context $context) : bool
Parameters
- $uri : HTMLPurifier_URI
-
Reference to a HTMLPurifier_URI object
- $config : HTMLPurifier_Config
- $context : HTMLPurifier_Context
Return values
bool —success or failure