File indexing completed on 2024-05-12 06:02:05

0001 <?php
0002 
0003 /**
0004  * Module adds the target=blank attribute transformation to a tags.  It
0005  * is enabled by HTML.TargetBlank
0006  */
0007 class HTMLPurifier_HTMLModule_TargetBlank extends HTMLPurifier_HTMLModule
0008 {
0009     /**
0010      * @type string
0011      */
0012     public $name = 'TargetBlank';
0013 
0014     /**
0015      * @param HTMLPurifier_Config $config
0016      */
0017     public function setup($config)
0018     {
0019         $a = $this->addBlankElement('a');
0020         $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetBlank();
0021     }
0022 }
0023 
0024 // vim: et sw=4 sts=4