diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 19dd654..a02225b 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -647,7 +647,7 @@ module ApplicationHelper
             end
           when 'source', 'export'
             if project && project.repository
-              name =~ %r{^[/\\]*(.*?)(@([0-9a-f]+))?(#(L\d+))?$}
+              name =~ %r{^[/\\]*(.*?)(@([0-9a-zA-Z_.-]+))?(#(L\d+))?$}
               path, rev, anchor = $1, $3, $5
               link = link_to h("#{prefix}:#{name}"), {:controller => 'repositories', :action => 'entry', :id => project,
                                                       :path => to_path_param(path),
