From 98ffc642a9f0e20a79d8358da4336ce27547718e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 15 Aug 2019 01:21:55 +0000 Subject: [PATCH] Networks and Sites: Trim site domain when creating a new site on Add New Site screen before further validation. Props dharmin16, jeremyfelt, aubreypwd. Fixes #44808. Built from https://develop.svn.wordpress.org/trunk@45804 git-svn-id: http://core.svn.wordpress.org/trunk@45615 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/site-new.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php index 37a266be6a..150ea3d4ef 100644 --- a/wp-admin/network/site-new.php +++ b/wp-admin/network/site-new.php @@ -42,6 +42,8 @@ if ( isset( $_REQUEST['action'] ) && 'add-site' == $_REQUEST['action'] ) { $blog = $_POST['blog']; $domain = ''; + + $blog['domain'] = trim( $blog['domain'] ); if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) { $domain = strtolower( $blog['domain'] ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 18214c99fe..8db2b4a6c9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45803'; +$wp_version = '5.3-alpha-45804'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.