diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-03-14 08:39:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-03-14 08:39:24 +0000 |
commit | 5da48d929367df231df8dde382bdb8e5eb7e1540 (patch) | |
tree | 6fe5705960a449ebe6993ad15631ed5689869ed5 /app/helpers | |
parent | 1aea5ccfd4e818a93f6340b01fd659409f8ec598 (diff) | |
download | redmine-5da48d929367df231df8dde382bdb8e5eb7e1540.tar.gz redmine-5da48d929367df231df8dde382bdb8e5eb7e1540.zip |
Attached inline images with non-ascii file name can not be seen when text formatting is Makdown (#19313).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@14080 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 74f8ab828..c58873c20 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -634,7 +634,7 @@ module ApplicationHelper text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")?/i) do |m| filename, ext, alt, alttext = $1.downcase, $2, $3, $4 # search for the picture in attachments - if found = Attachment.latest_attach(attachments, filename) + if found = Attachment.latest_attach(attachments, CGI.unescape(filename)) image_url = download_named_attachment_url(found, found.filename, :only_path => only_path) desc = found.description.to_s.gsub('"', '') if !desc.blank? && alttext.blank? |