Changeset 6105 for trunk/wp-includes/formatting.php
- Timestamp:
- 09/13/2007 04:51:33 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r6102 r6105 648 648 // This is a pre save filter, so text is already escaped. 649 649 $text = stripslashes($text); 650 $text = preg_replace ('|<a (.+?)>|ie', "'<a ' . str_replace(' rel=\"nofollow\"','',stripslashes('$1')) . ' rel=\"nofollow\">'", $text);650 $text = preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $text); 651 651 $text = $wpdb->escape($text); 652 652 return $text; 653 } 654 655 function wp_rel_nofollow_callback( $matches ) { 656 $text = $matches[1]; 657 $text = str_replace(array(' rel="nofollow"', " rel='nofollow'"), '', $text); 658 return "<a $text rel=\"nofollow\">"; 653 659 } 654 660
Note: See TracChangeset
for help on using the changeset viewer.