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

0001 <?php
0002 
0003 /**
0004  * Module adds the target-based noreferrer attribute transformation to a tags.  It
0005  * is enabled by HTML.TargetNoreferrer
0006  */
0007 class HTMLPurifier_HTMLModule_TargetNoreferrer extends HTMLPurifier_HTMLModule
0008 {
0009     /**
0010      * @type string
0011      */
0012     public $name = 'TargetNoreferrer';
0013 
0014     /**
0015      * @param HTMLPurifier_Config $config
0016      */
0017     public function setup($config) {
0018         $a = $this->addBlankElement('a');
0019         $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetNoreferrer();
0020     }
0021 }