Don't duplicate nofollow on edit. Props filosofo. fixes #2995

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-09-25 02:16:18 +00:00
parent 5f4d439a1b
commit a0ebe5b7b5

View File

@ -591,7 +591,7 @@ function make_clickable($ret) {
}
function wp_rel_nofollow( $text ) {
$text = preg_replace('|<a (.+?)>|i', '<a $1 rel="nofollow">', $text);
$text = preg_replace('|<a (.+?)>|ie', "'<a ' . str_replace(' rel=\"nofollow\"','',stripslashes('$1')) . ' rel=\"nofollow\">'", $text);
return $text;
}