Skip to content

Commit

Permalink
Fix rendering the cleaner page on Ruby 3
Browse files Browse the repository at this point in the history
Commit stolen from ono#53
  • Loading branch information
dandan committed Jul 20, 2023
1 parent bb78ae7 commit 75ffac1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/resque_cleaner/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}=#{CGI.escape(value.to_s)}"}.join("&")

@list_url = "cleaner_list?#{params}"
@dump_url = "cleaner_dump?#{params}"
Expand Down
2 changes: 1 addition & 1 deletion lib/resque_cleaner/server/views/_stats.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</tr>
<% @stats[type.to_sym].each do |field,count| %>
<tr>
<% filter = "#{q}=#{URI.encode(field)}" %>
<% filter = "#{q}=#{CGI.escape(field)}" %>
<td><%= field %></td>
<td class="number">
<a href="cleaner_list?<%=filter%>"><%= count[:total] %></a>
Expand Down

0 comments on commit 75ffac1

Please sign in to comment.