From cb245550974f5b3a2c35b16556c7680e910999ab Mon Sep 17 00:00:00 2001 From: filesite Date: Thu, 16 May 2024 12:23:20 +0800 Subject: [PATCH] improve url check function --- common.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mjs b/common.mjs index 692dc1d..f007c9b 100644 --- a/common.mjs +++ b/common.mjs @@ -133,7 +133,7 @@ class Common { //检查url是否符合要求 isUrlOk(url) { - return /^http(s)?:\/\/[\w\.\/:]{6,100}$/i.test(url); + return /^http(s)?:\/\/[\w\-\.\/:]{6,100}$/i.test(url); } //检查uuid是否符合要求:6-32位的英文字符串