mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 11:20:13 +02:00
- Rename Duplicate to Unique, as the name of validator indicates what we want the input to be
- Enable flush to work when includes are renamed git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1597 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -158,22 +158,6 @@ class HTMLPurifier_ConfigSchema {
|
||||
* @param $description Description of the namespace
|
||||
*/
|
||||
public function addNamespace($namespace, $description) {
|
||||
if (HTMLPURIFIER_SCHEMA_STRICT) {
|
||||
if (isset($this->info[$namespace])) {
|
||||
trigger_error('Cannot redefine namespace', E_USER_ERROR);
|
||||
return;
|
||||
}
|
||||
if (!ctype_alnum($namespace)) {
|
||||
trigger_error('Namespace name must be alphanumeric',
|
||||
E_USER_ERROR);
|
||||
return;
|
||||
}
|
||||
if (empty($description)) {
|
||||
trigger_error('Description must be non-empty',
|
||||
E_USER_ERROR);
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->info[$namespace] = array();
|
||||
$this->info_namespace[$namespace] = new HTMLPurifier_ConfigDef_Namespace();
|
||||
$this->info_namespace[$namespace]->description = $description;
|
||||
|
Reference in New Issue
Block a user