mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
Add preProcess and postProcess infrastructure to HTMLModule and HTMLDefinition so that almost all functionality that does not involve merging the modules together can be factored into modules.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@733 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -305,6 +305,9 @@ class HTMLPurifier_HTMLDefinition
|
||||
$this->info_content_sets = $this->content_sets->lookup;
|
||||
|
||||
foreach ($this->modules as $module_i => $module) {
|
||||
|
||||
$module->preProcess($this, $config);
|
||||
|
||||
// process element-wise definitions
|
||||
foreach ($module->info as $name => $def) {
|
||||
// setup info
|
||||
@@ -348,6 +351,9 @@ class HTMLPurifier_HTMLDefinition
|
||||
foreach($module->info_tag_transform as $k => $v) $this->info_tag_transform[$k] = $v;
|
||||
foreach($module->info_attr_transform_pre as $k => $v) $this->info_attr_transform_pre[$k] = $v;
|
||||
foreach($module->info_attr_transform_post as $k => $v) $this->info_attr_transform_post[$k]= $v;
|
||||
|
||||
$module->postProcess($this, $config);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user