summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-27 16:02:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-27 16:02:49 +0000
commitf928f36070201806a908d7f12da4c4d9ef21dbf7 (patch)
treee69e0e3054840746b701bde8e7aea9e2004ab014 /app
parent10a38010fbe7aa001aa3f4cba1af1db67455d81e (diff)
downloadredmine-f928f36070201806a908d7f12da4c4d9ef21dbf7.tar.gz
redmine-f928f36070201806a908d7f12da4c4d9ef21dbf7.zip
Wiki links to repositories with underscore their identifiers don't work (#12979).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11281 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 344fe1c96..02e9d5dba 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -659,7 +659,7 @@ module ApplicationHelper
# identifier:version:1.0.0
# identifier:source:some/file
def parse_redmine_links(text, default_project, obj, attr, only_path, options)
- text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(([a-z0-9\-_]+):)?(attachment|document|version|forum|news|message|project|commit|source|export)?(((#)|((([a-z0-9\-]+)\|)?(r)))((\d+)((#note)?-(\d+))?)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]][^A-Za-z0-9_/])|,|\s|\]|<|$)}) do |m|
+ text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(([a-z0-9\-_]+):)?(attachment|document|version|forum|news|message|project|commit|source|export)?(((#)|((([a-z0-9\-_]+)\|)?(r)))((\d+)((#note)?-(\d+))?)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]][^A-Za-z0-9_/])|,|\s|\]|<|$)}) do |m|
leading, esc, project_prefix, project_identifier, prefix, repo_prefix, repo_identifier, sep, identifier, comment_suffix, comment_id = $1, $2, $3, $4, $5, $10, $11, $8 || $12 || $18, $14 || $19, $15, $17
link = nil
project = default_project
@@ -748,7 +748,7 @@ module ApplicationHelper
when 'commit', 'source', 'export'
if project
repository = nil
- if name =~ %r{^(([a-z0-9\-]+)\|)(.+)$}
+ if name =~ %r{^(([a-z0-9\-_]+)\|)(.+)$}
repo_prefix, repo_identifier, name = $1, $2, $3
repository = project.repositories.detect {|repo| repo.identifier == repo_identifier}
else