Attachment filename with comma fails to get a proper url

Enonic version: Enonic XP 6.6.2
OS: OSX 10.11.6

I recently started working with attachments. I have a list of links to attachments. The list works with most filenames, but if I use a file with a comma, β€˜,’, in the name i run into problems.
I have tried to remedy this by using encodeURIComponent(), but to no avail.
I believe this is an error in /lib/xp/portal/attachmentUrl().

I am not able to reproduce the problem.
Can you put some sample code where you get the problem?

What is the exact name of the filename that fails? And maybe the URL that attachmentUrl() returns.


The filename I have that is failing is: Prisliste for pakker, stykk- og partigods nasjonalt 01.12.2015.pdf.
If I modify it to Prisliste for pakker stykk- og partigods nasjonalt 01.12.2015.pdf it works.

Here is the code from our link-util library:

link.url = attachmentUrl({
    id: linkMixin.attachmentLink, //8edfbb39-9152-4eb9-864e-561296816098
    download: true

The result from attachmentUrl(), that fails, is:

The filename without comma results in the following url that works:

I get the problem now, thanks.
We are looking into it.

1 Like

This bug has been fixed.
It’s included in the v6.7.0-RC6 tag, and will be part of the 6.7 release.

1 Like

This topic was automatically closed after 24 hours. New replies are no longer allowed.