3 class HTMLPurifier_HTMLModule_NofollowTest
extends HTMLPurifier_HTMLModuleHarness
8 $this->config
->set('HTML.Nofollow', true);
9 $this->config
->set('Attr.AllowedRel', array("nofollow", "blah"));
12 function testNofollow() {
14 '<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>',
15 '<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>'
19 function testNofollowDupe() {
21 '<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>'