From ebb60489f077f2ca73556416f1931945268c03ec Mon Sep 17 00:00:00 2001 From: Filipe Brito Date: Mon, 16 Sep 2019 18:04:20 -0300 Subject: [PATCH] [FIX] Server URL regex (#1175) --- app/views/NewServerView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/NewServerView.js b/app/views/NewServerView.js index c70500412..58755a65e 100644 --- a/app/views/NewServerView.js +++ b/app/views/NewServerView.js @@ -181,7 +181,7 @@ class NewServerView extends React.Component { url = `${ url }.rocket.chat`; } - if (/^(https?:\/\/)?(((\w|[0-9])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) { + if (/^(https?:\/\/)?(((\w|[0-9-_])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) { if (/^localhost(:\d+)?/.test(url)) { url = `http://${ url }`; } else if (/^https?:\/\//.test(url) === false) {