3 class HTMLPurifier_HTMLModule_TargetBlankTest
extends HTMLPurifier_HTMLModuleHarness
6 public function setUp()
9 $this->config
->set('HTML.TargetBlank', true);
12 public function testTargetBlank()
15 '<a href="http://google.com">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>',
16 '<a href="http://google.com" target="_blank" rel="noreferrer noopener">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>'
20 public function testTargetBlankNoDupe() {
22 '<a href="http://google.com" target="_blank">a</a>',
23 '<a href="http://google.com" target="_blank" rel="noreferrer noopener">a</a>'