From f666a7ca09db58bc252620050a6bfa2fd4baaeb8 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 3 Apr 2017 13:29:48 -0700 Subject: [PATCH 1/2] [Web Page] Allow dashes in domains Fixes #1507 --- platform/features/pages/bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/features/pages/bundle.js b/platform/features/pages/bundle.js index 9fd12d051d..bc981b77e4 100644 --- a/platform/features/pages/bundle.js +++ b/platform/features/pages/bundle.js @@ -47,7 +47,7 @@ define([ "key": "url", "name": "URL", "control": "textfield", - "pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$", + "pattern": "^(ftp|https?)\\:\\/\\/[-\\w]+(\\.[-\\w]+)*(\\:\\d+)?(\\/\\S*)*$", "required": true, "cssClass": "l-input-lg" } From c07a372c6e662eca3edeb4c6813e074588d4168a Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 3 Apr 2017 14:23:21 -0700 Subject: [PATCH 2/2] [Web Page] Simplify RegEx https://github.com/nasa/openmct/pull/1508#issuecomment-291271270 --- platform/features/pages/bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/features/pages/bundle.js b/platform/features/pages/bundle.js index bc981b77e4..6773f4dd6f 100644 --- a/platform/features/pages/bundle.js +++ b/platform/features/pages/bundle.js @@ -47,7 +47,7 @@ define([ "key": "url", "name": "URL", "control": "textfield", - "pattern": "^(ftp|https?)\\:\\/\\/[-\\w]+(\\.[-\\w]+)*(\\:\\d+)?(\\/\\S*)*$", + "pattern": "^(ftp|https?)\\:\\/\\/", "required": true, "cssClass": "l-input-lg" }