mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 21:28:06 +02:00
Convert HTMLPurifier_Config to use property list backend.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -11,6 +11,11 @@ class HTMLPurifier_ConfigSchema {
|
||||
*/
|
||||
public $defaults = array();
|
||||
|
||||
/**
|
||||
* The default property list. Do not edit this property list.
|
||||
*/
|
||||
public $defaultPlist;
|
||||
|
||||
/**
|
||||
* Definition of the directives. The structure of this is:
|
||||
*
|
||||
@@ -47,6 +52,10 @@ class HTMLPurifier_ConfigSchema {
|
||||
*/
|
||||
static protected $singleton;
|
||||
|
||||
public function __construct() {
|
||||
$this->defaultPlist = new HTMLPurifier_PropertyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unserializes the default ConfigSchema.
|
||||
*/
|
||||
@@ -84,6 +93,7 @@ class HTMLPurifier_ConfigSchema {
|
||||
if ($allow_null) $obj->allow_null = true;
|
||||
$this->info[$namespace][$name] = $obj;
|
||||
$this->defaults[$namespace][$name] = $default;
|
||||
$this->defaultPlist->set("$namespace.$name", $default);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user