lib/conjur/escape.rb in conjur-api-5.3.5 vs lib/conjur/escape.rb in conjur-api-5.3.6
- old
+ new
@@ -78,12 +78,11 @@
# @return [String] the value escaped as described
def path_or_query_escape(str)
return "false" unless str
str = str.id if str.respond_to?(:id)
# Leave colons and forward slashes alone
- require 'uri'
- pattern = URI::PATTERN::UNRESERVED + ":\\/@"
- URI.escape(str.to_s, Regexp.new("[^#{pattern}]"))
+ require 'addressable/uri'
+ Addressable::URI.encode(str.to_s)
end
end
# @api private
def self.included(base)