Make WordPress Core


Ignore:
Timestamp:
08/21/2008 10:58:29 PM (16 years ago)
Author:
ryan
Message:

Consolidate contiguous whitespace in usernames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r8662 r8704  
    447447    if ( $strict )
    448448        $username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username);
     449
     450    // Consolidate contiguous whitespace
     451    $username = preg_replace('|\s+|', ' ', $username);
    449452
    450453    return apply_filters('sanitize_user', $username, $raw_username, $strict);
Note: See TracChangeset for help on using the changeset viewer.