Validates a URI as defined by RFC 3986.
More...
Validates a URI as defined by RFC 3986.
- Note
- Scheme-specific mechanics deferred to HTMLPurifier_URIScheme
Definition at line 7 of file URI.php.
◆ __construct()
HTMLPurifier_AttrDef_URI::__construct |
( |
|
$embeds_resource = false | ) |
|
- Parameters
-
bool | $embeds_resource | Does the URI here result in an extra HTTP request? |
Definition at line 23 of file URI.php.
26 $this->embedsResource = (bool)$embeds_resource;
Parses a URI into the components and fragment identifier as specified by RFC 3986.
◆ make()
HTMLPurifier_AttrDef_URI::make |
( |
|
$string | ) |
|
◆ validate()
HTMLPurifier_AttrDef_URI::validate |
( |
|
$uri, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
- Parameters
-
- Returns
- bool|string
Definition at line 45 of file URI.php.
References $config, $ok, $result, and HTMLPurifier_AttrDef\parseCDATA().
47 if (
$config->get(
'URI.Disable')) {
54 $uri = $this->parser->parse($uri);
60 $context->register(
'EmbeddedURI', $this->embedsResource);
72 $uri_def =
$config->getDefinition(
'URI');
79 $scheme_obj = $uri->getSchemeObj(
$config, $context);
83 if ($this->embedsResource && !$scheme_obj->browsable) {
102 $context->destroy(
'EmbeddedURI');
107 return $uri->toString();
parseCDATA($string)
Convenience method that parses a string as if it were CDATA.
◆ $embedsResource
HTMLPurifier_AttrDef_URI::$embedsResource |
|
protected |
◆ $parser
HTMLPurifier_AttrDef_URI::$parser |
|
protected |
The documentation for this class was generated from the following file:
- libs/composer/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php