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

[1.7.0] Modify addElement to return a reference to the created definition, shorten other HTMLModules accordingly.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1046 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-12 20:44:47 +00:00
parent ed73fdd5b8
commit e0cf214c44
6 changed files with 22 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule
var $content_sets = array('Inline' => 'img');
function HTMLPurifier_HTMLModule_Image() {
$this->addElement(
$img =& $this->addElement(
'img', true, 'Inline', 'Empty', 'Common',
array(
'alt' => 'Text',
@@ -28,7 +28,7 @@ class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule
'width' => 'Length'
)
);
$this->info['img']->attr_transform_post[] =
$img->attr_transform_post[] =
new HTMLPurifier_AttrTransform_ImgRequired();
}