diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee
index 8eb83c257..44ae9459d 100644
--- a/app/assets/javascripts/app/lib/app_post/utils.coffee
+++ b/app/assets/javascripts/app/lib/app_post/utils.coffee
@@ -1146,7 +1146,7 @@ class App.Utils
html.find('img').each( (index) ->
src = $(@).attr('src')
- if !src.match(/^data:/i)
+ if !src.match(/^(data|cid):/i) # may mean broken emails (see issue #2305)
base64 = App.Utils._htmlImage2DataUrl(@)
$(@).attr('src', base64)
)
diff --git a/public/assets/tests/html_utils.js b/public/assets/tests/html_utils.js
index e7ecd85eb..a9826538d 100644
--- a/public/assets/tests/html_utils.js
+++ b/public/assets/tests/html_utils.js
@@ -3079,6 +3079,11 @@ test("htmlImage2DataUrl", function() {
result = App.Utils.htmlImage2DataUrl(source)
equal(result, should, source)
+ source = 'some test'
+ should = 'some test'
+ result = App.Utils.htmlImage2DataUrl(source)
+ equal(result, should, source)
+
});
source = 'some test'