summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJason Lee <huacnlee@gmail.com>2016-01-12 17:32:25 +0800
committerJason Lee <huacnlee@gmail.com>2016-01-12 18:20:03 +0800
commit932a247f5fb4a14b3e096ec88a73f8fce481eebb (patch)
treeb6006ac76347d46c484b755be8345925419769b4 /config
parent41bcab118ae8be1baee0d750d99f46f584bd2fd4 (diff)
downloadgitlab-ce-932a247f5fb4a14b3e096ec88a73f8fce481eebb.tar.gz
Use CGI.escape instead of URI.escape, because URI is obsoleted.
ref: https://github.com/ruby/ruby/commit/238b979f1789f95262a267d8df6239806f2859cc
Diffstat (limited to 'config')
-rw-r--r--config/initializers/1_settings.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index a9c5b2caf0a..d625a909bf1 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -11,7 +11,7 @@ class Settings < Settingslogic
# get host without www, thanks to http://stackoverflow.com/a/6674363/1233435
def get_host_without_www(url)
- url = URI.encode(url)
+ url = CGI.escape(url)
uri = URI.parse(url)
uri = URI.parse("http://#{url}") if uri.scheme.nil?
host = uri.host.downcase