File indexing completed on 2025-01-26 05:29:07
0001 <?php 0002 0003 /** 0004 * Module adds the target-based noopener attribute transformation to a tags. It 0005 * is enabled by HTML.TargetNoopener 0006 */ 0007 class HTMLPurifier_HTMLModule_TargetNoopener extends HTMLPurifier_HTMLModule 0008 { 0009 /** 0010 * @type string 0011 */ 0012 public $name = 'TargetNoopener'; 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_TargetNoopener(); 0020 } 0021 }