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
This commit is contained in:
Sergey Biryukov 2019-08-15 01:21:55 +00:00
parent d85ba82d8e
commit 98ffc642a9
2 changed files with 3 additions and 1 deletions

View File

@ -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'] );
}

View File

@ -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.