From 51b0542e7d3c0dbaafb5da5c12f335eb8ad8b240 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 12 Apr 2019 05:25:31 +0000 Subject: Attachments with Unicode uppercase names are not shown in wiki pages (#30441). Patch by Evgeny Seliverstov. git-svn-id: http://svn.redmine.org/redmine/trunk@18057 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d00636d4c..1eef95100 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -774,7 +774,7 @@ module ApplicationHelper attachments += obj.attachments if obj.respond_to?(:attachments) if attachments.present? text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")?/i) do |m| - filename, ext, alt, alttext = $1.downcase, $2, $3, $4 + filename, ext, alt, alttext = $1, $2, $3, $4 # search for the picture in attachments if found = Attachment.latest_attach(attachments, CGI.unescape(filename)) image_url = download_named_attachment_url(found, found.filename, :only_path => only_path) -- cgit v1.2.3