@@ -244,7 +244,7 module ApplicationHelper | |||
|
244 | 244 | text = text.gsub(/!((\<|\=|\>)?(\([^\)]+\))?(\[[^\]]+\])?(\{[^\}]+\})?)(\S+\.(gif|jpg|jpeg|png))!/) do |m| |
|
245 | 245 | style = $1 |
|
246 | 246 | filename = $6 |
|
247 | rf = Regexp.new(filename, Regexp::IGNORECASE) | |
|
247 | rf = Regexp.new(Regexp.escape(filename), Regexp::IGNORECASE) | |
|
248 | 248 | # search for the picture in attachments |
|
249 | 249 | if found = attachments.detect { |att| att.filename =~ rf } |
|
250 | 250 | image_url = url_for :only_path => only_path, :controller => 'attachments', :action => 'download', :id => found |
General Comments 0
You need to be logged in to leave comments.
Login now