<?php function AddTargetBlankFilteringFunction($text){
$urlactive = get_bloginfo('wpurl');
$urlactive = str_replace(".","\.",$urlactive);
$urlactive = str_replace("/","\/",$urlactive);
$urlactive = str_replace("www","(?!www",$urlactive);
return preg_replace('/href=["|\']?('.$urlactive.')([^"\']*))["|\']?/ui', "href=\"$1\" title=\"Site externe : $1\" target=\"_blank\"", $text);
}
add_filter( 'get_comment_author_link', 'AddTargetBlankFilteringFunction');
add_filter( 'get_comment_author_url_link', 'AddTargetBlankFilteringFunction');
add_filter('comment_text', 'AddTargetBlankFilteringFunction');
add_filter('the_content', 'AddTargetBlankFilteringFunction');
?>