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

git-svn-id: https://develop.svn.wordpress.org/trunk@4135 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-08-30 16:50:12 +00:00
parent 0644529857
commit 1bca5d994d
1 changed files with 1 additions and 1 deletions

View File

@ -598,7 +598,7 @@ function wp_rel_nofollow( $text ) {
global $wpdb;
// This is a pre save filter, so text is already escaped.
$text = stripslashes($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);
$text = $wpdb->escape($text);
return $text;
}