Defect #16668

Redmine links broken when object name contains special characters

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

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Text formatting
Target version:2.5.2
Resolution:Fixed Affected version:2.5.0

Description

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

attachment:"Test & Show.txt" 

attachment:"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

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

Associated revisions

Revision 13106
Added by Jean-Philippe Lang over 4 years ago

Redmine links not working with html escpaed characters (#16668).

History

#1 Updated by Darth Vader over 4 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

#2 Updated by Jean-Philippe Lang over 4 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.

#3 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Resolved to Closed

Merged.

Also available in: Atom PDF