##// END OF EJS Templates
Fixed: single file 'View difference' links do not work because of duplicate slashes in url....
Jean-Philippe Lang -
r1310:8d4aa6f9ade6
parent child
Show More
@@ -58,8 +58,11 module RepositoriesHelper
58 58 end
59 59
60 60 def with_leading_slash(path)
61 path ||= ''
62 path.starts_with?('/') ? path : "/#{path}"
61 path.to_s.starts_with?('/') ? path : "/#{path}"
62 end
63
64 def without_leading_slash(path)
65 path.gsub(%r{^/+}, '')
63 66 end
64 67
65 68 def subversion_field_tags(form, repository)
@@ -49,7 +49,7
49 49 <td><div class="square action_<%= change.action %>"></div> <%= change.path %> <%= "(#{change.revision})" unless change.revision.blank? %></td>
50 50 <td align="right">
51 51 <% if change.action == "M" %>
52 <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => change.path, :rev => @changeset.revision %>
52 <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => without_leading_slash(change.path), :rev => @changeset.revision %>
53 53 <% end %>
54 54 </td>
55 55 </tr>
General Comments 0
You need to be logged in to leave comments. Login now