From 22342a29ad9368e5477c2dfc3ad1cacf3e9fa8da Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 27 Aug 2016 23:45:07 +0200 Subject: [PATCH] client/file-dropper: fix URL validation --- client/js/controls/file_dropper_control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/controls/file_dropper_control.js b/client/js/controls/file_dropper_control.js index 300b283e..113e7aca 100644 --- a/client/js/controls/file_dropper_control.js +++ b/client/js/controls/file_dropper_control.js @@ -65,7 +65,7 @@ class FileDropperControl extends events.EventTarget { if (!url) { return; } - if (!url.match(/^https:?\/\/[^.]+\..+$/)) { + if (!url.match(/^https?:\/\/[^.]+\..+$/)) { window.alert(`"${url}" does not look like a valid URL.`); return; }