gentoo-overlay/www-apps/gitlabhq/files/gitlabhq-7.7.1-fix-project-name-regex.patch

26 lines
715 B
Diff

diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index cf6e260..5657566 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
module Gitlab
module Regex
extend self
@@ -11,12 +13,12 @@ module Gitlab
end
def project_name_regex
- /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\. ]*\z/
+ /\A[\p{Word}_.][\p{Word}_\-:\. ]*\z/
end
def project_regex_message
- "can contain only letters, digits, '_', '-' and '.' and space. " \
- "It must start with letter, digit or '_'."
+ "can contain only letters, digits, '_', '-', ':' and '.' and space. " \
+ "It must start with letter, digit, '.' or '_'."
end
def name_regex