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:
parent
0644529857
commit
1bca5d994d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue