Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Nofollow


Mark
Member

@delayedinsanity

If you have a my_plugins.php (or something similar) in your bb-plugins/, you can add this there. Alternatively, you could add it to your themes functions.php file. It’s only stopgap though, it’s not bulletproof, I’m a little rusty on regular expressions since I’ve been developing themes more lately than I have been doing real programming;

function my_nofollow ( $ret ) {
return preg_replace('#(<a[^"]+"[^"]+")>([^<]+</a>)#', '$1 rel="nofollow">$2', $ret);
}

add_filter('pre_post', 'my_nofollow');

I’m not sure if this would qualify for trac, considering it’s not so much of a bug as it is an oversight? Mods?

Skip to toolbar