Make WordPress Core

Ticket #7728: sanitize_user.patch

File sanitize_user.patch, 529 bytes (added by snakefoot, 17 years ago)

Consolidate contiguous whitespace in sanitize_user

  • functions-formatting.php

     
    291291        // If strict, reduce to ASCII for max portability.
    292292        if ( $strict )
    293293                $username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username);
     294               
     295        // Consolidate contiguous whitespace
     296        $username = preg_replace('|\s+|', ' ', $username);
    294297
    295298        return apply_filters('sanitize_user', $username, $raw_username, $strict);
    296299}