3 class HTMLPurifier_HTMLModule_TargetNoreferrerTest
extends HTMLPurifier_HTMLModuleHarness
6 public function setUp()
9 $this->config
->set('HTML.TargetNoreferrer', true);
10 $this->config
->set('Attr.AllowedFrameTargets', '_blank');
13 public function testNoreferrer()
16 '<a href="http://google.com" target="_blank">x</a>',
17 '<a href="http://google.com" target="_blank" rel="noreferrer">x</a>'
21 public function testNoreferrerNoDupe()
23 $this->config
->set('Attr.AllowedRel', 'noreferrer');
25 '<a href="http://google.com" target="_blank" rel="noreferrer">x</a>',
26 '<a href="http://google.com" target="_blank" rel="noreferrer">x</a>'
30 public function testTargetBlankNoreferrer()
32 $this->config
->set('HTML.TargetBlank', true);
34 '<a href="http://google.com">x</a>',
35 '<a href="http://google.com" target="_blank" rel="noreferrer">x</a>'