# HG changeset patch # User dicky # Date 1353292003 -25200 # Node ID b47f9515c23fbe0dd37a33daea9a2b67cf85991b # Parent 50df88f93ef478974baa1a97c334ae1f5a56c83e Workaround to allow space in inline image. Subtitute space with %20 when referring to image eg. Photo Skitch Document.png -> Photo%20Skitch%20Document.png diff -r 50df88f93ef4 -r b47f9515c23f app/models/attachment.rb --- a/app/models/attachment.rb Sun Nov 18 23:15:45 2012 +0000 +++ b/app/models/attachment.rb Mon Nov 19 09:26:43 2012 +0700 @@ -243,7 +243,7 @@ def self.latest_attach(attachments, filename) attachments.sort_by(&:created_on).reverse.detect { - |att| att.filename.downcase == filename.downcase + |att| att.filename.downcase == filename.downcase.gsub(/%20/,' '); } end