diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml
index 86102cc5..8538f30d 100644
--- a/app/views/repositories/diff.rhtml
+++ b/app/views/repositories/diff.rhtml
@@ -1,12 +1,9 @@
<%= l(:label_revision) %> <%= format_revision(@rev) %> <%= @path.gsub(/^.*\//, '') %>
-<% form_tag({ :controller => 'repositories', :action => 'diff'}, :method => 'get') do %>
- <% params.each do |k, p| %>
- <% if k != "type" %>
- <%= hidden_field_tag(k,p) %>
- <% end %>
- <% end %>
+<% form_tag({}, :method => 'get') do %>
+ <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
+ <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
<%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %>
<% end %>