WordPress.org

Make WordPress Core

Changeset 4135


Ignore:
Timestamp:
08/30/2006 04:50:12 PM (15 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.