Defect #26507

"attachment:filename" link syntax would not work if the file name contains "@"

Added by Go MAEDA 5 months ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Text formatting
Target version:4.0.0
Resolution: Affected version:

Description

A file name which contains "@" is treated as email address.

Probably all versions that support "attachment:filename" syntax are affected. redmine.org is also affected. Please see this example: attachment:

[Textile]

attachment:image@2x.png

[Expected output]

<a class="attachment" href="/attachments/***/image@2x.png">image@2x.png</a>

[Actual output]

attachment:<a class="email" href="mailto:image@2x.png">image@2x.png</a>

wrong-attachment-link@2x.png (11.1 KB) Go MAEDA, 2017-07-24 06:28

26507_fix_attachment_links_with_@_in_file_name.patch Magnifier (1.97 KB) Marius BALTEANU, 2017-08-06 10:01


Related issues

Blocked by Redmine - Defect #26443: User link syntax (user:login) doesn't work for logins con... Confirmed

History

#1 Updated by Marius BALTEANU 5 months ago

I can work on this, but the fix will be based on the one from #26443.

#2 Updated by Go MAEDA 5 months ago

Marius BALTEANU wrote:

I can work on this, but the fix will be based on the one from #26443.

Sounds great. I set the target version of #26443 to 3.4.3. Could you write a patch?

#3 Updated by Marius BALTEANU 5 months ago

  • File 26507_fix_attachment_links_with_@_in_file_name added

Go MAEDA wrote:

Sounds great. I set the target version of #26443 to 3.4.3. Could you write a patch?

Here it is. In order to apply this patch, you need to apply first the patch from #26443.

#4 Updated by Go MAEDA 5 months ago

  • Blocked by Defect #26443: User link syntax (user:login) doesn't work for logins consisting of an email adress added

#5 Updated by Go MAEDA 5 months ago

  • Target version set to 3.4.3

The patch looks good to me and passed all tests.
Setting target version to 3.4.3.

Marius, thank you for writing the patch.

#6 Updated by Marius BALTEANU 4 months ago

Updated the patch to work with the latest changes from #26443.

#7 Updated by Marius BALTEANU 4 months ago

  • File deleted (26507_fix_attachment_links_with_@_in_file_name)

#8 Updated by Jean-Philippe Lang about 1 month ago

  • Target version changed from 3.4.3 to 4.0.0

#26443 is now set for 4.0.

Also available in: Atom PDF