lib/resque/server/views/failed.erb in resque-2.2.0 vs lib/resque/server/views/failed.erb in resque-2.2.1

- old
+ new

@@ -1,22 +1,22 @@ <% if failed_multiple_queues? && !params[:queue] %> <h1>All Failed Queues: <%= Resque::Failure.queues.size %> total</h1> <% else %> -<h1>Failed Jobs <%= "on '#{params[:queue]}'" if params[:queue] %> <%= "with class '#{params[:class]}'" if params[:class] %></h1> +<h1>Failed Jobs <%= "on '#{escape_html(params[:queue])}'" if params[:queue] %> <%= "with class '#{escape_html(params[:class])}'" if params[:class] %></h1> <% end %> <% unless failed_size.zero? %> <form method="POST" action="<%= u "failed#{'/' + params[:queue] if params[:queue]}/clear" %>"> - <input type="submit" name="" value="Clear <%= params[:queue] ? "'#{params[:queue]}'" : 'Failed' %> Jobs" class="confirmSubmission" /> + <input type="submit" name="" value="Clear <%= params[:queue] ? "'#{escape_html(params[:queue])}'" : 'Failed' %> Jobs" class="confirmSubmission" /> </form> <% unless params[:queue] %> <form method="POST" action="<%= u "failed/clear_retried" %>"> <input type="submit" name="" value="Clear Retried Jobs" onclick='return confirm("Are you absolutely sure? This cannot be undone.");' /> </form> <% end %> <form method="POST" action="<%= u "failed#{'/' + params[:queue] if params[:queue]}/requeue/all" %>"> - <input type="submit" name="" value="Retry <%= params[:queue] ? "'#{params[:queue]}'" : 'Failed' %> Jobs" class="confirmSubmission" /> + <input type="submit" name="" value="Retry <%= params[:queue] ? "'#{escape_html(params[:queue])}'" : 'Failed' %> Jobs" class="confirmSubmission" /> </form> <% end %> <% if failed_multiple_queues? && !params[:queue] %> <%= partial :failed_queues_overview %>