Project

General

Profile

Actions

Defect #16668

closed

Redmine links broken when object name contains special characters

Added by Darth Vader over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When attaching files with special characters (ampersand is an example), the attachment link does not work:

attachment:"Test & Show.txt" 

Test & Show.txt

The regular expression in application_helper.rb, parse_redmine_links does parse the filename correctly but it seems that the code that compares attachments to the filename fails to match the two.

Environment:
  Redmine version                2.5.0.stable
  Ruby version                   1.9.3-p231 (2012-05-25) [i386-mingw32]
  Rails version                  3.2.17
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.4
  Perforce                       2013.1
  Git                            1.8.5.2

Files

Test & Show.txt (11 Bytes) Test & Show.txt Darth Vader, 2014-04-14 17:25
Actions #1

Updated by Darth Vader over 10 years ago

The regular expression is located at:
source:trunk/app/helpers/application_helper.rb@12954#L748
And the source to associate the file name to the attachment is located at:
source:trunk/app/helpers/application_helper.rb@12954#L871

Actions #2

Updated by Jean-Philippe Lang over 10 years ago

  • Subject changed from Attachment link broken when filename contains special characters to Redmine links broken when object name contains special characters
  • Category set to Text formatting
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.2
  • Resolution set to Fixed

Fixed in r13106.

Actions #3

Updated by Jean-Philippe Lang over 10 years ago

  • Status changed from Resolved to Closed

Merged.

Actions

Also available in: Atom PDF