diff options
author | Jason Lee <huacnlee@gmail.com> | 2016-01-12 12:32:25 +0300 |
---|---|---|
committer | Jason Lee <huacnlee@gmail.com> | 2016-01-12 13:20:03 +0300 |
commit | 932a247f5fb4a14b3e096ec88a73f8fce481eebb (patch) | |
tree | b6006ac76347d46c484b755be8345925419769b4 /config | |
parent | 41bcab118ae8be1baee0d750d99f46f584bd2fd4 (diff) |
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.rb | 2 |
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 |