Make WordPress Core

Changeset 8748


Ignore:
Timestamp:
08/27/2008 06:04:43 PM (16 years ago)
Author:
ryan
Message:

Consolidate contiguous whitespace in usernames . For 2.6

File:
1 edited

Legend:

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

    r8298 r8748  
    332332    if ( $strict )
    333333        $username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username);
     334
     335    // Consolidate contiguous whitespace
     336    $username = preg_replace('|\s+|', ' ', $username);
    334337
    335338    return apply_filters('sanitize_user', $username, $raw_username, $strict);
Note: See TracChangeset for help on using the changeset viewer.