|
| __construct ($scheme, $userinfo, $host, $port, $path, $query, $fragment) |
|
| getSchemeObj ($config, $context) |
| Retrieves a scheme object corresponding to the URI's scheme/default.
|
|
| isBenign ($config, $context) |
| Returns true if this URL should be considered a 'benign' URL, that is:
|
|
| isLocal ($config, $context) |
| Returns true if this URL might be considered a 'local' URL given the current context.
|
|
| toString () |
| Convert URI back to string.
|
|
| validate ($config, $context) |
| Generic validation method applicable for all schemes.
|
|
|
| $fragment |
| @type string
|
|
| $host |
| @type string
|
|
| $path |
| @type string
|
|
| $port |
| @type int
|
|
| $query |
| @type string
|
|
| $scheme |
| @type string
|
|
| $userinfo |
| @type string
|
|
◆ __construct()
HTMLPurifier_URI::__construct |
( |
| $scheme, |
|
|
| $userinfo, |
|
|
| $host, |
|
|
| $port, |
|
|
| $path, |
|
|
| $query, |
|
|
| $fragment ) |
- Parameters
-
string | $scheme | |
string | $userinfo | |
string | $host | |
int | $port | |
string | $path | |
string | $query | |
string | $fragment | |
- Note
- Automatically normalizes scheme and port
◆ getSchemeObj()
HTMLPurifier_URI::getSchemeObj |
( |
| $config, |
|
|
| $context ) |
Retrieves a scheme object corresponding to the URI's scheme/default.
- Parameters
-
- Return values
-
◆ isBenign()
HTMLPurifier_URI::isBenign |
( |
| $config, |
|
|
| $context ) |
Returns true if this URL should be considered a 'benign' URL, that is:
- It is a local URL (isLocal), and
- It has a equal or better level of security
- Parameters
-
- Return values
-
◆ isLocal()
HTMLPurifier_URI::isLocal |
( |
| $config, |
|
|
| $context ) |
Returns true if this URL might be considered a 'local' URL given the current context.
This is true when the host is null, or when it matches the host supplied to the configuration.
Note that this does not do any scheme checking, so it is mostly only appropriate for metadata that doesn't care about protocol security. isBenign is probably what you actually want.
- Parameters
-
- Return values
-
◆ toString()
HTMLPurifier_URI::toString |
( |
| ) |
|
Convert URI back to string.
- Return values
-
string | URI appropriate for output |
◆ validate()
HTMLPurifier_URI::validate |
( |
| $config, |
|
|
| $context ) |
Generic validation method applicable for all schemes.
May modify this URI in order to get it into a compliant form.
- Parameters
-
- Return values
-
bool | True if validation/filtering succeeds, false if failure |
The documentation for this class was generated from the following file:
- lib/htmlpurifier/HTMLPurifier/URI.php