mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 05:39:58 +09:00
HTMLPurifier update
약간 커스텀 된 부분 모두 반영. File lock 부분과 htmlspecialchars 부분.
This commit is contained in:
parent
ae7cbf51c0
commit
2957f8cebe
242 changed files with 11737 additions and 5915 deletions
|
|
@ -3,14 +3,32 @@
|
|||
/**
|
||||
* Validates ftp (File Transfer Protocol) URIs as defined by generic RFC 1738.
|
||||
*/
|
||||
class HTMLPurifier_URIScheme_ftp extends HTMLPurifier_URIScheme {
|
||||
|
||||
class HTMLPurifier_URIScheme_ftp extends HTMLPurifier_URIScheme
|
||||
{
|
||||
/**
|
||||
* @type int
|
||||
*/
|
||||
public $default_port = 21;
|
||||
|
||||
/**
|
||||
* @type bool
|
||||
*/
|
||||
public $browsable = true; // usually
|
||||
|
||||
/**
|
||||
* @type bool
|
||||
*/
|
||||
public $hierarchical = true;
|
||||
|
||||
public function doValidate(&$uri, $config, $context) {
|
||||
$uri->query = null;
|
||||
/**
|
||||
* @param HTMLPurifier_URI $uri
|
||||
* @param HTMLPurifier_Config $config
|
||||
* @param HTMLPurifier_Context $context
|
||||
* @return bool
|
||||
*/
|
||||
public function doValidate(&$uri, $config, $context)
|
||||
{
|
||||
$uri->query = null;
|
||||
|
||||
// typecode check
|
||||
$semicolon_pos = strrpos($uri->path, ';'); // reverse
|
||||
|
|
@ -33,10 +51,8 @@ class HTMLPurifier_URIScheme_ftp extends HTMLPurifier_URIScheme {
|
|||
$uri->path = str_replace(';', '%3B', $uri->path);
|
||||
$uri->path .= $type_ret;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue