diff options
author | John Keiser <john@johnkeiser.com> | 2016-08-22 12:02:29 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-08-22 13:44:20 -0700 |
commit | 28a00bdf0511969215920f47c7338f4d214c8337 (patch) | |
tree | 727efc3fa555f1123eb4176ca2b44a3bbe7f93f0 /lib/chef/knife | |
parent | d2def622dfdabe56ea638bed1a63af81275681c2 (diff) | |
download | chef-28a00bdf0511969215920f47c7338f4d214c8337.tar.gz |
Stop using obsolete URI.escape; use Addressable::URI instead.
See http://stackoverflow.com/questions/2824126/whats-the-difference-between-uri-escape-and-cgi-escape#answer-13059657 for details on why.
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/search.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/search.rb b/lib/chef/knife/search.rb index 38d1ab3f42..d102c1e955 100644 --- a/lib/chef/knife/search.rb +++ b/lib/chef/knife/search.rb @@ -18,6 +18,7 @@ require "chef/knife" require "chef/knife/core/node_presenter" +require "addressable/uri" class Chef class Knife @@ -85,8 +86,7 @@ class Chef end q = Chef::Search::Query.new - escaped_query = URI.escape(@query, - Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) + escaped_query = Addressable::URI.encode_component(@query, Addressable::URI::CharacterClasses::QUERY) result_items = [] result_count = 0 |