Browse Source

Merge branch 'V202108' into fixs-249

pull/279/head
zhoupzh 3 years ago
parent
commit
cf1aef65fd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/repo/cloudbrain.go

+ 2
- 2
routers/repo/cloudbrain.go View File

@@ -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, "")



Loading…
Cancel
Save