Changeset 2117
- Timestamp:
- 01/21/05 18:24:14 (4 years ago)
- Files:
-
- trunk/wp-includes/comment-functions.php (modified) (1 diff)
- trunk/wp-includes/functions-formatting.php (modified) (1 diff)
- trunk/wp-includes/vars.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/comment-functions.php
r2114 r2117 159 159 $return = $author; 160 160 else 161 $return = "<a href='$url' rel='external '>$author</a>";161 $return = "<a href='$url' rel='external nofollow'>$author</a>"; 162 162 return apply_filters('get_comment_author_link', $return); 163 163 } trunk/wp-includes/functions-formatting.php
r2057 r2117 480 480 function make_clickable($ret) { 481 481 $ret = ' ' . $ret . ' '; 482 $ret = preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1<a href='$2://$3' >$2://$3</a>", $ret);483 $ret = preg_replace("#(\s)www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^ <>{}()\n\r]*[^., <>{}()\n\r]?)?)#i", "$1<a href='http://www.$2.$3$4' >www.$2.$3$4</a>", $ret);482 $ret = preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1<a href='$2://$3' rel='nofollow'>$2://$3</a>", $ret); 483 $ret = preg_replace("#(\s)www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^ <>{}()\n\r]*[^., <>{}()\n\r]?)?)#i", "$1<a href='http://www.$2.$3$4' rel='nofollow'>www.$2.$3$4</a>", $ret); 484 484 $ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([^,< \n\r]+)#i", "$1<a href=\"mailto:$2@$3\">$2@$3</a>", $ret); 485 485 $ret = trim($ret); 486 486 return $ret; 487 } 488 489 function wp_rel_nofollow( $text ) { 490 $text = preg_replace('|<a(.+?)>|i', '<a$1 rel="nofollow">', $text); 491 return $text; 487 492 } 488 493 trunk/wp-includes/vars.php
r2107 r2117 141 141 142 142 add_filter('pre_comment_content', 'wp_filter_kses'); 143 add_filter('pre_comment_content', 'wp_rel_nofollow', 15); 143 144 add_filter('pre_comment_content', 'balanceTags', 30); 144 145
