Validates ftp (File Transfer Protocol) URIs as defined by generic RFC 1738.
More...
|
| doValidate (&$uri, $config, $context) |
|
| doValidate (&$uri, $config, $context) |
| Validates the components of a URI for a specific scheme. More...
|
|
| validate (&$uri, $config, $context) |
| Public interface for validating components of a URI. More...
|
|
Validates ftp (File Transfer Protocol) URIs as defined by generic RFC 1738.
Definition at line 6 of file ftp.php.
◆ doValidate()
HTMLPurifier_URIScheme_ftp::doValidate |
( |
& |
$uri, |
|
|
|
$config, |
|
|
|
$context |
|
) |
| |
- Parameters
-
- Returns
- bool
Definition at line 29 of file ftp.php.
34 $semicolon_pos = strrpos($uri->path,
';');
35 if ($semicolon_pos !==
false) {
36 $type = substr($uri->path, $semicolon_pos + 1);
37 $uri->path = substr($uri->path, 0, $semicolon_pos);
39 if (strpos($type,
'=') !==
false) {
41 list($key, $typecode) = explode(
'=', $type, 2);
42 if ($key !==
'type') {
44 $uri->path .=
'%3B' . $type;
45 } elseif ($typecode ===
'a' || $typecode ===
'i' || $typecode ===
'd') {
46 $type_ret =
";type=$typecode";
49 $uri->path .=
'%3B' . $type;
51 $uri->path = str_replace(
';',
'%3B', $uri->path);
52 $uri->path .= $type_ret;
◆ $browsable
HTMLPurifier_URIScheme_ftp::$browsable = true |
◆ $default_port
HTMLPurifier_URIScheme_ftp::$default_port = 21 |
◆ $hierarchical
HTMLPurifier_URIScheme_ftp::$hierarchical = true |
The documentation for this class was generated from the following file:
- libs/composer/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/ftp.php