diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 11:46:57 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:32:41 -0600 |
commit | 7d4b52b27dcbe30d85d4fad27e983cee51cf6677 (patch) | |
tree | e7320b078fcb04b73ab9f9bfc50b7a9efc672239 /lib/gitlab/url_sanitizer.rb | |
parent | eacae00516ffe534f197eeca20655cbc0fdf5694 (diff) | |
download | gitlab-ce-7d4b52b27dcbe30d85d4fad27e983cee51cf6677.tar.gz |
Enable Style/WordArray
Diffstat (limited to 'lib/gitlab/url_sanitizer.rb')
-rw-r--r-- | lib/gitlab/url_sanitizer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/url_sanitizer.rb b/lib/gitlab/url_sanitizer.rb index 19dad699edf..1f0d96088cf 100644 --- a/lib/gitlab/url_sanitizer.rb +++ b/lib/gitlab/url_sanitizer.rb @@ -1,7 +1,7 @@ module Gitlab class UrlSanitizer def self.sanitize(content) - regexp = URI::Parser.new.make_regexp(['http', 'https', 'ssh', 'git']) + regexp = URI::Parser.new.make_regexp(%w(http https ssh git)) content.gsub(regexp) { |url| new(url).masked_url } rescue Addressable::URI::InvalidURIError |