From 0bea7c7ad2ee8e82a86919b1cd2fea517cc67ec8 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 15 Sep 2008 15:45:31 +0000 Subject: Merge with WP 2.6.2 git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1471 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/formatting.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wp-includes/formatting.php') 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); } -- cgit