0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-13 00:38:42 +00:00
htmlpurifier/library/HTMLPurifier/HTMLModule/Noopener.php

26 lines
507 B
PHP

<?php
/**
* Module adds the noopener attribute transformation to a tags. It
* is enabled by HTML.Noopener
*/
class HTMLPurifier_HTMLModule_Noopener extends HTMLPurifier_HTMLModule
{
/**
* @type string
*/
public $name = 'Noopener';
/**
* @param HTMLPurifier_Config $config
*/
public function setup($config)
{
$a = $this->addBlankElement('a');
$a->attr_transform_post[] = new HTMLPurifier_AttrTransform_Noopener();
}
}
// vim: et sw=4 sts=4