3 class HTMLPurifier_HTMLModule_NofollowTest
extends HTMLPurifier_HTMLModuleHarness
6 public function setUp()
9 $this->config
->set('HTML.Nofollow', true);
10 $this->config
->set('Attr.AllowedRel', array("nofollow", "blah"));
13 public function testNofollow()
16 '<a href="http://google.com">x</a><a href="http://google.com" rel="blah">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>',
17 '<a href="http://google.com" rel="nofollow">x</a><a href="http://google.com" rel="blah nofollow">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>'
21 public function testNofollowDupe()
24 '<a href="http://google.com" rel="nofollow">x</a><a href="http://google.com" rel="blah nofollow">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>'