mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Don't duplicate nofollow on edit. Props filosofo. fixes #2995
git-svn-id: http://svn.automattic.com/wordpress/trunk@4135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cdc1c73f61
commit
bbb5ffca6d
@ -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
Block a user