diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-20 17:03:17 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-20 17:03:17 +0000 |
| commit | de23735d75bd523cea68e43fc1ef717eb440d069 (patch) | |
| tree | 324aec89bd3e3ed45a3976d526b6abd50bb5d230 /wp-inst/wp-includes/functions-formatting.php | |
| parent | 42ad115c5b6e5d184a54f825a5c24b19a3b30fb3 (diff) | |
WP Merge
Removed Legacy Code (Thanks IT Damager)
createBlog - only backup roles class if it exists!
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@507 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/functions-formatting.php')
| -rw-r--r-- | wp-inst/wp-includes/functions-formatting.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wp-inst/wp-includes/functions-formatting.php b/wp-inst/wp-includes/functions-formatting.php index 255b6cc..274d7e6 100644 --- a/wp-inst/wp-includes/functions-formatting.php +++ b/wp-inst/wp-includes/functions-formatting.php @@ -266,7 +266,12 @@ function remove_accents($string) { } function sanitize_user( $username ) { - return preg_replace('|a-z0-9 _.-|i', '', $username); + $raw_username = $username; + $username = strip_tags($username); + // Kill octets + $username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username); + $username = preg_replace('/&.+?;/', '', $username); // Kill entities + return apply_filters('sanitize_user', $username, $raw_username); } function sanitize_title($title, $fallback_title = '') { |
