Add %HTML.TargetNoreferrer, which adds rel="noreferrer" when target attribute is set
[htmlpurifier.git] / tests / HTMLPurifier / HTMLModule / TargetBlankTest.php
blobdbb755f64aa86d7c14ce3720b88c8c2597f03199
1 <?php
3 class HTMLPurifier_HTMLModule_TargetBlankTest extends HTMLPurifier_HTMLModuleHarness
6 public function setUp()
8 parent::setUp();
9 $this->config->set('HTML.TargetBlank', true);
12 public function testTargetBlank()
14 $this->assertResult(
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">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>'
22 // vim: et sw=4 sts=4