diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index eb6b91e26b5..93e013ab1b3 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -24,20 +24,20 @@ module Gitlab %r{ (?! - # doesn't begins with - \/| # (rule #6) - # doesn't contain + (?# doesn't begins with) + \/| (?# rule #6) + (?# doesn't contain) .*(?: - [\/.]\.| # (rule #1,3) - \/\/| # (rule #6) - @\{| # (rule #8) - \\ # (rule #9) + [\/.]\.| (?# rule #1,3) + \/\/| (?# rule #6) + @\{| (?# rule #8) + \\ (?# rule #9) ) ) - [^\000-\040\177~^:?*\[]+ # (rule #4-5) - # doesn't end with - (?