diff --git a/lib/resque_cleaner/server.rb b/lib/resque_cleaner/server.rb index a132a5f..b8edada 100644 --- a/lib/resque_cleaner/server.rb +++ b/lib/resque_cleaner/server.rb @@ -230,7 +230,7 @@ def build_urls f: @from, t: @to, regex: @regex - }.map {|key,value| "#{key}=#{URI.encode(value.to_s)}"}.join("&") + }.map {|key,value| "#{key}=#{URI.encode_www_form_component(value.to_s)}"}.join("&") @list_url = "cleaner_list?#{params}" @dump_url = "cleaner_dump?#{params}" diff --git a/lib/resque_cleaner/server/views/_stats.erb b/lib/resque_cleaner/server/views/_stats.erb index 05bafb7..ea9112b 100644 --- a/lib/resque_cleaner/server/views/_stats.erb +++ b/lib/resque_cleaner/server/views/_stats.erb @@ -10,7 +10,7 @@ <% @stats[type.to_sym].each do |field,count| %> - <% filter = "#{q}=#{URI.encode(field)}" %> + <% filter = "#{q}=#{URI.encode_www_form_component(field)}" %> <%= field %> <%= count[:total] %>