Changeset 4135

Show
Ignore:
Timestamp:
08/30/06 16:50:12 (2 years ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/formatting.php

    r4050 r4135  
    599599    // This is a pre save filter, so text is already escaped. 
    600600    $text = stripslashes($text); 
    601     $text = preg_replace('|<a (.+?)>|i', '<a $1 rel="nofollow">', $text); 
     601    $text = preg_replace('|<a (.+?)>|ie', "'<a ' . str_replace(' rel=\"nofollow\"','',stripslashes('$1')) . ' rel=\"nofollow\">'", $text); 
    602602    $text = $wpdb->escape($text); 
    603603    return $text;