MDL-19183 imported HTMLpurifier 3.3.0

This commit is contained in:
skodak
2009-05-14 08:31:11 +00:00
parent 1cc9acedbe
commit 63e6a80976
324 changed files with 3017 additions and 2561 deletions

View File

@@ -7,9 +7,9 @@
*/
class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule
{
public $name = 'Image';
public function setup($config) {
$max = $config->get('HTML', 'MaxImgLength');
$img = $this->addElement(
@@ -20,7 +20,7 @@ class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule
// be abused, so we allow only Pixels.
'height' => 'Pixels#' . $max,
'width' => 'Pixels#' . $max,
'longdesc' => 'URI',
'longdesc' => 'URI',
'src*' => new HTMLPurifier_AttrDef_URI(true), // embedded
)
);
@@ -28,12 +28,13 @@ class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule
$img->attr['height'] =
$img->attr['width'] = 'Length';
}
// kind of strange, but splitting things up would be inefficient
$img->attr_transform_pre[] =
$img->attr_transform_post[] =
new HTMLPurifier_AttrTransform_ImgRequired();
}
}
// vim: et sw=4 sts=4