Fixed: Inline images don't work if file name has upper case letters or if image is in BMP format (#2102).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1958 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-10-28 10:43:34 +00:00
parent 6cd4f0c07e
commit 0f1787ea0d
2 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ module ApplicationHelper
if attachments
attachments = attachments.sort_by(&:created_on).reverse
text = text.gsub(/!((\<|\=|\>)?(\([^\)]+\))?(\[[^\]]+\])?(\{[^\}]+\})?)(\S+\.(gif|jpg|jpeg|png))!/) do |m|
text = text.gsub(/!((\<|\=|\>)?(\([^\)]+\))?(\[[^\]]+\])?(\{[^\}]+\})?)(\S+\.(bmp|gif|jpg|jpeg|png))!/i) do |m|
style = $1
filename = $6
rf = Regexp.new(Regexp.escape(filename), Regexp::IGNORECASE)