Bug: Mails with Attachements

Hi!

When I send an E-Mail with Attachement to my RT and the Filename of the
Attachement contains a whitespace this whitespace is not encoded in the
link showing up in the Ticket.

An example Link looks like this:

http://ticket.int.kn/Ticket/Attachment/2016/1251/7 Sekunden.jpg

But is should be more like this:

http://ticket.int.kn/Ticket/Attachment/2016/1251/7%20Sekunden.jpg

Otherwise you will just receive an Errormessage from the Webserver. I guess
it will be the same with Special-Characters in the filename. I guess its a
bug, but it might as well be a local problem of my own.

Best regards,
Nils

Nils Ketelsen wrote:

When I send an E-Mail with Attachement to my RT and the Filename of the
Attachement contains a whitespace this whitespace is not encoded in the
link showing up in the Ticket.

Otherwise you will just receive an Errormessage from the Webserver. I guess
it will be the same with Special-Characters in the filename. I guess its a
bug, but it might as well be a local problem of my own.

Confirmed bug. Most browsers seem to compensate, it seems.

The attached hack will work around it for spaces only; feel free
to improve it to deal with any other special chars. (Something
like URI::Escape might be the way to go…)
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

Attachment-encoding-patch (898 Bytes)

Confirmed bug. Most browsers seem to compensate, it seems.

The attached hack will work around it for spaces only; feel free
to improve it to deal with any other special chars. (Something
like URI::Escape might be the way to go…)

My Mason is kind of rusty, but you should be able to do:

Download <%$message->Filename|| ‘(untitled)’%> <% $size
%>

(note the “|u”)

Tony

Tony Cook wrote:

Download <%$message->Filename|| ‘(untitled)’%> <% $size
%>

(note the “|u”)

Ooh, shiny. That does indeed work, and it’s much nicer than my way.

Note to self: Learn more Mason tricks.
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances