]> source.dussan.org Git - redmine.git/commitdiff
Attachments with Unicode uppercase names are not shown in wiki pages (#30441).
authorGo MAEDA <maeda@farend.jp>
Fri, 12 Apr 2019 05:25:31 +0000 (05:25 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 12 Apr 2019 05:25:31 +0000 (05:25 +0000)
Patch by Evgeny Seliverstov.

git-svn-id: http://svn.redmine.org/redmine/trunk@18057 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index d00636d4c7d8323c8aa2ab2d895a793567fe097f..1eef95100d0b655841b0e1d3736aef9dd5924eef 100644 (file)
@@ -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)