28 $uri = $this->percentEncoder->normalize($uri);
34 '(([a-zA-Z0-9\.\+\-]+):)?'.
42 $result = preg_match($r_URI, $uri, $matches);
47 $scheme = !empty($matches[1]) ? $matches[2] :
null;
48 $authority = !empty($matches[3]) ? $matches[4] :
null;
50 $query = !empty($matches[6]) ? $matches[7] :
null;
51 $fragment = !empty($matches[8]) ? $matches[9] :
null;
54 if ($authority !==
null) {
55 $r_authority =
"/^((.+?)@)?(\[[^\]]+\]|[^:]*)(:(\d*))?/";
57 preg_match($r_authority, $authority, $matches);
58 $userinfo = !empty($matches[1]) ? $matches[2] :
null;
59 $host = !empty($matches[3]) ? $matches[3] :
'';
60 $port = !empty($matches[4]) ? (int) $matches[5] :
null;
62 $port = $host = $userinfo =
null;
66 $scheme, $userinfo, $host, $port,
$path,
$query, $fragment);
Class that handles operations involving percent-encoding in URIs.
Parses a URI into the components and fragment identifier as specified by RFC 3986.
$percentEncoder
Instance of HTMLPurifier_PercentEncoder to do normalization with.
HTML Purifier's internal representation of a URI.