easy_translate 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/easy_translate/translator.rb +3 -3
- data/lib/easy_translate/version.rb +1 -1
- metadata +2 -2
@@ -93,9 +93,9 @@ module EasyTranslate
|
|
93
93
|
raise ArgumentError.new('no string given') if text.empty?
|
94
94
|
key = options[:key] || @api_key || nil
|
95
95
|
params = "v=#{API_VERSION}"
|
96
|
-
params << '&userip=' << options[:user_ip] if options.has_key?(:user_ip)
|
97
|
-
params << '&hl=' << get_language(options[:host_language]) if options.has_key?(:host_language)
|
98
|
-
params << '&key=' << key if key
|
96
|
+
params << '&userip=' << URI.escape(options[:user_ip]) if options.has_key?(:user_ip)
|
97
|
+
params << '&hl=' << URI.escape(get_language(options[:host_language])) if options.has_key?(:host_language)
|
98
|
+
params << '&key=' << URI.escape(key) if key
|
99
99
|
# key is standard - but left to individual methods
|
100
100
|
params
|
101
101
|
end
|