Defect #23067

Custom field List Link values to URL breaks on entries with spaces

Added by Sönke Noack 9 months ago. Updated 7 months ago.

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

0%

Category:Custom fields
Target version:3.1.7
Resolution:Fixed Affected version:

Description

Situation:
You have a custom field of the type "List".
In your list are entries which run like "entry" and "second entry".

While "entry" will generate a link with the "Link values to URL" using value, "second entry" will not be clickable.
If I'd use "second+entry", it'll very well work though.

Suggested solution:
Redmine is to parse blanks and substitute plusses for them automatically before outputting the link.
It will present the list entry in the custom field as a clickable link.

System info:
Environment:
Redmine version 3.2.3.stable
Ruby version 2.0.0-p647 (2015-08-18) [x86_64-linux]
Rails version 4.2.5.2
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.13
Git 2.6.1
Filesystem
Redmine plugins:
no plugin installed


Related issues

Related to Redmine - Defect #23841: Custom field URL spaces not decoded properly Closed

Associated revisions

Revision 15539
Added by Jean-Philippe Lang 8 months ago

Custom field List Link values to URL breaks on entries with spaces (#23067).

Revision 15550
Added by Jean-Philippe Lang 8 months ago

Remove debug stuff introduced in r15539.

History

#1 Updated by Jean-Philippe Lang 8 months ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.1.7
  • Resolution set to Fixed

Fix committed in r15539, thanks for pointing this out.

#3 Updated by Jean-Philippe Lang 8 months ago

  • Status changed from Resolved to Closed

#4 Updated by Sönke Noack 8 months ago

Thank you very much for the swift fix, Jean-Philippe :)

#5 Updated by Philip Schiffer 7 months ago

This breaks pretty much any url which has fragments. You should never encode the complete url, just the parameters.
Example: Try to link to
http://example.com#test=%m1%
The link will now be
http://example.com%23test=%m1%

#6 Updated by Toshi MARUYAMA 5 months ago

  • Related to Defect #23841: Custom field URL spaces not decoded properly added

Also available in: Atom PDF