diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index b0696d6614..65f629cb10 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -843,7 +843,7 @@ function wpmu_create_user( $user_name, $password, $email) { } function wpmu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id = 1) { - $domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) ); + $domain = preg_replace( '/\s+/', '', sanitize_key( $domain ) ); if ( is_subdomain_install() ) $domain = str_replace( '@', '', $domain ); diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index c4f30b9131..6ded1b385f 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -352,7 +352,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) { unset( $args['capabilities'] ); $args['name'] = $taxonomy; - $args['object_type'] = (array) $object_type; + $args['object_type'] = is_array($object_type) ? array_map('sanitize_key', $object_type) : (array) sanitize_key($object_type); $args['labels'] = get_taxonomy_labels( (object) $args ); $args['label'] = $args['labels']->name;