PHPIDS
Current file: /home/mario/workspace/php-ids.org/trunk/lib/IDS/vendors/htmlpurifier/HTMLPurifier/HTMLModule/Image.php
Legend: executed not executed dead code

  Coverage
  Classes Methods Lines
Total
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 13 / 13
 
HTMLPurifier_HTMLModule_Image
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 13 / 13
 public function __construct()
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 12 / 12


       1                 : <?php                                                                    
       2                 :                                                                          
       3                 : /**                                                                      
       4                 :  * XHTML 1.1 Image Module provides basic image embedding.                
       5                 :  * @note There is specialized code for removing empty images in          
       6                 :  *       HTMLPurifier_Strategy_RemoveForeignElements                     
       7                 :  */                                                                      
       8               1 : class HTMLPurifier_HTMLModule_Image extends HTMLPurifier_HTMLModule      
       9                 : {                                                                        
      10                 :                                                                          
      11                 :     public $name = 'Image';                                              
      12                 :                                                                          
      13                 :     public function __construct() {                                      
      14               1 :         $img = $this->addElement(                                        
      15               1 :             'img', 'Inline', 'Empty', 'Common',                          
      16                 :             array(                                                       
      17               1 :                 'alt*' => 'Text',                                        
      18               1 :                 'height' => 'Length',                                    
      19               1 :                 'longdesc' => 'URI',                                     
      20               1 :                 'src*' => new HTMLPurifier_AttrDef_URI(true), // embedded
      21                 :                 'width' => 'Length'                                      
      22               1 :             )                                                            
      23               1 :         );                                                               
      24                 :         // kind of strange, but splitting things up would be inefficient 
      25               1 :         $img->attr_transform_pre[] =                                     
      26               1 :         $img->attr_transform_post[] =                                    
      27               1 :             new HTMLPurifier_AttrTransform_ImgRequired();                
      28               1 :     }                                                                    
      29                 :                                                                          
      30                 : }                                                                        
      31                 :                                                                          

Generated by PHPUnit 3.2.20 and Xdebug 2.0.3 at Sat Jun 7 16:15:42 CEST 2008.