Defect #27968
closedImage filename for HDPI monitors (image@2x.jpg) are misrecognized as email address
Description
Image files for HDMI monitors (e.g., MacBook Pro Retina monitors) usually have "@2x" suffix in their filename, like "logo@2x.png". If you write such filenames in issues or wiki pages, Redmine misrecognizes them as email addresses and they will have useless "mailto:" link.
Example:
is rendered as
Files
Updated by Mischa The Evil almost 9 years ago
- Related to Defect #26507: "attachment:filename" link syntax would not work if the file name contains "@" added
Updated by Marius BĂLTEANU over 8 years ago
Go Maeda, what do you think about restoring only the following patterns: (.*@2x\.(png|jpg|gif|jpeg))?
In this way, formats like:
- logo@2x.png: it'll be restored to string
- logo@2x.us: it'll link to mailto:logo@2x.us
- logo@2x.jpg: it'll be restored to string
- logo@2x.gif: it'll be restored to string
Updated by Go MAEDA over 8 years ago
Marius BALTEANU wrote:
Go Maeda, what do you think about restoring only the following patterns: (.*@2x\.(png|jpg|gif|jpeg))?
I think more image extensions such as "bmp" and "jpe" should be supported. Please see source:tags/3.4.5/app/helpers/application_helper.rb#L713
Updated by Marius BĂLTEANU over 8 years ago
Go MAEDA wrote:
I think more image extensions such as "bmp" and "jpe" should be supported. Please see source:tags/3.4.5/app/helpers/application_helper.rb#L713
[...]
Perfect, thanks for pointing me to that line, I didn't know about it.
Updated by Marius BĂLTEANU over 8 years ago
- File 0001-do-not-recognize-hires-images-as-email-addresses.patch 0001-do-not-recognize-hires-images-as-email-addresses.patch added
Attached a patch that fixes this issue. It should be applied after the fix from #26507.
Updated by Go MAEDA over 8 years ago
- Target version set to 4.0.0
Updated by Jean-Philippe Lang over 8 years ago
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Patch committed, thanks Marius.