From cf4bfac55b394a48664adf0c31c106ec47e432b6 Mon Sep 17 00:00:00 2001 From: yuriinalivaiko Date: Mon, 13 Sep 2021 17:28:50 +0300 Subject: [PATCH] -fixed role ID regexp --- includes/admin/templates/role/role-edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/templates/role/role-edit.php b/includes/admin/templates/role/role-edit.php index ea402be9..b705955a 100644 --- a/includes/admin/templates/role/role-edit.php +++ b/includes/admin/templates/role/role-edit.php @@ -90,7 +90,7 @@ if ( ! empty( $_POST['role'] ) ) { $error .= __( 'Title is empty!', 'ultimate-member' ) . '
'; } - if ( preg_match( "/[a-z0-9]+$/i", $data['name'] ) ) { + if ( preg_match( "/^[\p{Latin}\d\-_ ]+$/i", $data['name'] ) ) { $id = sanitize_title( $data['name'] ); } else { $auto_increment = UM()->options()->get( 'custom_roles_increment' );