Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
The expansion of $name in ATTACHEDFILELINKFORMAT is bad:
- the first occurrence expands to the url-encoded version of the filename
- the second occurrence expands to the "normal" filename
- any further occurrences are not expanded at all
see Foswiki::Attach::getAttachmentLink()
I propose
- to introduce $url which expands to the url-encoded representation
- and to change the default behaviour of $name to always expand to "the normal filename"
This will break backward-compatibility for those, who have a custom ATTACHEDFILELINKFORMAT setting.
I would like to make those changes. Any objections/concerns?
--
OliverKrueger - 09 Jul 2009
Go for it. /me thinks of a bad code award.
--
MichaelDaum - 10 Jul 2009
Added $filename and $fileurl instead of kicking $name. Added docs in
FileAttachment and changed default settings in
DefaultPreferences.
--
OliverKrueger - 23 Jul 2009