diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-09-15 15:45:31 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-09-15 15:45:31 +0000 |
commit | 0bea7c7ad2ee8e82a86919b1cd2fea517cc67ec8 (patch) | |
tree | 5b95d4a59dbb761f8da80c9e894d22a7a547b00c /wp-includes/formatting.php | |
parent | 66b0871abeef45cdbe757c97a643076503b6c656 (diff) | |
download | wordpress-mu-0bea7c7ad2ee8e82a86919b1cd2fea517cc67ec8.tar.gz wordpress-mu-0bea7c7ad2ee8e82a86919b1cd2fea517cc67ec8.tar.xz wordpress-mu-0bea7c7ad2ee8e82a86919b1cd2fea517cc67ec8.zip |
Merge with WP 2.6.2
git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1471 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/formatting.php')
-rw-r--r-- | wp-includes/formatting.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index e2b969a..eeafe0b 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -332,6 +332,9 @@ function sanitize_user( $username, $strict = false ) { if ( $strict ) $username = preg_replace('|[^a-z0-9 _.\-@]|i', '', $username); + // Consolidate contiguous whitespace + $username = preg_replace('|\s+|', ' ', $username); + return apply_filters('sanitize_user', $username, $raw_username, $strict); } |