mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-03 04:37:39 +02:00
[1.7.0] Implement HTMLDefinition cache (very hacked together, but long unit test times were driving me crazy!)
- Add extra protection in AttrDef_URI against phantom Schemes - Doctype moved from config to HTMLDefinition - AttrDef_URITest mocks have more generic object parameters to deal with PHP4's copy-happy behavior git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1089 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -99,6 +99,12 @@ class HTMLPurifier_HTMLModuleManager
|
||||
*/
|
||||
var $doctypes;
|
||||
|
||||
/**
|
||||
* Instance of current doctype
|
||||
* @public
|
||||
*/
|
||||
var $doctype;
|
||||
|
||||
/**
|
||||
* Instance of HTMLPurifier_AttrTypes
|
||||
* @public
|
||||
@@ -288,8 +294,8 @@ class HTMLPurifier_HTMLModuleManager
|
||||
$this->trusted = $config->get('HTML', 'Trusted');
|
||||
|
||||
// generate
|
||||
$doctype = $this->doctypes->make($config);
|
||||
$modules = $doctype->modules;
|
||||
$this->doctype = $this->doctypes->make($config);
|
||||
$modules = $this->doctype->modules;
|
||||
|
||||
// take out the default modules that aren't allowed
|
||||
$lookup = $config->get('HTML', 'AllowedModules');
|
||||
@@ -309,7 +315,7 @@ class HTMLPurifier_HTMLModuleManager
|
||||
$this->processModule($module);
|
||||
}
|
||||
|
||||
foreach ($doctype->tidyModules as $module) {
|
||||
foreach ($this->doctype->tidyModules as $module) {
|
||||
$this->processModule($module);
|
||||
if (method_exists($this->modules[$module], 'construct')) {
|
||||
$this->modules[$module]->construct($config);
|
||||
|
Reference in New Issue
Block a user