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. git-svn-id: https://develop.svn.wordpress.org/trunk@45804 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4f86944a09
commit
e982455e44
@ -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'] );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user