3 require_once 'HTMLPurifier/HTMLModule.php';
5 require_once 'HTMLPurifier/AttrDef/URI.php';
6 require_once 'HTMLPurifier/AttrTransform/ImgRequired.php';
9 * XHTML 1.1 Image Module provides basic image embedding.
10 * @note There is specialized code for removing empty images in
11 * HTMLPurifier_Strategy_RemoveForeignElements
13 class HTMLPurifier_HTMLModule_Image
extends HTMLPurifier_HTMLModule
18 function HTMLPurifier_HTMLModule_Image() {
19 $img =& $this->addElement(
20 'img', true, 'Inline', 'Empty', 'Common',
25 'src*' => new HTMLPurifier_AttrDef_URI(true), // embedded
29 // kind of strange, but splitting things up would be inefficient
30 $img->attr_transform_pre
[] =
31 $img->attr_transform_post
[] =
32 new HTMLPurifier_AttrTransform_ImgRequired();