1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-09 07:36:40 +02:00

Remove trailing whitespace.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2008-12-06 02:28:20 -05:00
parent 3a6b63dff1
commit 2c955af135
476 changed files with 5595 additions and 5547 deletions

View File

@@ -5,7 +5,7 @@
*/
class HTMLPurifier_URISchemeRegistry
{
/**
* Retrieve sole instance of the registry.
* @param $prototype Optional prototype to overload sole instance with,
@@ -22,12 +22,12 @@ class HTMLPurifier_URISchemeRegistry
}
return $instance;
}
/**
* Cache of retrieved schemes.
*/
protected $schemes = array();
/**
* Retrieves a scheme validator object
* @param $scheme String scheme name like http or mailto
@@ -37,7 +37,7 @@ class HTMLPurifier_URISchemeRegistry
public function getScheme($scheme, $config, $context) {
if (!$config) $config = HTMLPurifier_Config::createDefault();
$null = null; // for the sake of passing by reference
// important, otherwise attacker could include arbitrary file
$allowed_schemes = $config->get('URI', 'AllowedSchemes');
if (!$config->get('URI', 'OverrideAllowedSchemes') &&
@@ -45,16 +45,16 @@ class HTMLPurifier_URISchemeRegistry
) {
return $null;
}
if (isset($this->schemes[$scheme])) return $this->schemes[$scheme];
if (!isset($allowed_schemes[$scheme])) return $null;
$class = 'HTMLPurifier_URIScheme_' . $scheme;
if (!class_exists($class)) return $null;
$this->schemes[$scheme] = new $class();
return $this->schemes[$scheme];
}
/**
* Registers a custom scheme to the cache, bypassing reflection.
* @param $scheme Scheme name
@@ -63,7 +63,7 @@ class HTMLPurifier_URISchemeRegistry
public function register($scheme, $scheme_obj) {
$this->schemes[$scheme] = $scheme_obj;
}
}