From 2d0ab1031b3e3c6c28dd947150cc481c2965b94e Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Thu, 19 Aug 2021 17:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/cloudbrain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 8b93c7e29..4138e702f 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -91,9 +91,9 @@ func cutString(str string, lens int) string { func jobNamePrefixValid(s string) string { lowStr := strings.ToLower(s) re := regexp.MustCompile(`[^a-z0-9_\\-]+`) - //去掉非法字符 + removeSpecial := re.ReplaceAllString(lowStr, "") - //任务名以数字字母开头,去掉非法前缀 + re = regexp.MustCompile(`^[_\\-]+`) return re.ReplaceAllString(removeSpecial, "")