Defect #42
issue URL in repository comment break
| Status: | Closed | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
Description
If we have a comment in subversion like this:
issue #245; fixed the problem
The URL for the link includes the semi-colon and the link text does not:
issue <a href="/issues/show/281;">#281</a>
Clicking on these links generates a 404 error.
Thanks!
History
2007-04-12 10:23 - Pavol Murin
Fix: it is necessary to add a space after the link, as the word
boundary might be a character. I fixed it in the following way:
change in app/helpers/application_helper.rb:
line 122:
text = text.gsub(/#(\d+)(?=\b)/) {|m|
"\"##{$1}\":" + url_for(:controller =>
'issues', :action => 'show', :id => $1) }
to:
text = text.gsub(/#(\d+)(?=\b)/) {|m|
"\"##{$1}\":" + url_for(:controller =>
'issues', :action => 'show', :id => $1) + " " }
and line 127:
text = text.gsub(/r(\d+)(?=\b)/) {|m|
"\"r#{$1}\":" + url_for(:controller =>
'repositories', :action => 'revision', :id => @project.id,
:rev => $1) } if @project
to:
"\"r#{$1}\":" + url_for(:controller =>
'repositories', :action => 'revision', :id => @project.id,
:rev => $1) + " " } if @project
text = text.gsub(/r(\d+)(?=\b)/) {|m|
muro