Changeset 6106
- Timestamp:
- 09/13/2007 04:51:46 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/wp-includes/formatting.php
r5931 r6106 637 637 // This is a pre save filter, so text is already escaped. 638 638 $text = stripslashes($text); 639 $text = preg_replace ('|<a (.+?)>|ie', "'<a ' . str_replace(' rel=\"nofollow\"','',stripslashes('$1')) . ' rel=\"nofollow\">'", $text);639 $text = preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $text); 640 640 $text = $wpdb->escape($text); 641 641 return $text; 642 } 643 644 function wp_rel_nofollow_callback( $matches ) { 645 $text = $matches[1]; 646 $text = str_replace(array(' rel="nofollow"', " rel='nofollow'"), '', $text); 647 return "<a $text rel=\"nofollow\">"; 642 648 } 643 649
Note: See TracChangeset
for help on using the changeset viewer.