WordPress.org

Make WordPress Core

Changeset 4233


Ignore:
Timestamp:
09/25/06 02:16:18 (8 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-includes/functions-formatting.php

    r4052 r4233  
    592592 
    593593function wp_rel_nofollow( $text ) { 
    594     $text = preg_replace('|<a (.+?)>|i', '<a $1 rel="nofollow">', $text); 
     594    $text = preg_replace('|<a (.+?)>|ie', "'<a ' . str_replace(' rel=\"nofollow\"','',stripslashes('$1')) . ' rel=\"nofollow\">'", $text); 
    595595    return $text; 
    596596} 
Note: See TracChangeset for help on using the changeset viewer.