26 $this->embedsResource = (bool)$embeds_resource;
33 public function make($string)
35 $embeds = ($string ===
'embedded');
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();
Base class for all validating attribute definitions.
parseCDATA($string)
Convenience method that parses a string as if it were CDATA.
validate($uri, $config, $context)
Parses a URI into the components and fragment identifier as specified by RFC 3986.
__construct($embeds_resource=false)
$parser
HTMLPurifier_URIParser
Validates a URI as defined by RFC 3986.