diff --git a/include/class.format.php b/include/class.format.php
index 05d8699881bfb67ea117b916bb22aa8f45fb8f96..a2d72340dcf02e3cba45990e4e455ab8146604e3 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -308,8 +308,9 @@ class Format {
                   ':<html[^>]+:i',              # drop html attributes
                   ':<(a|span) (name|style)="(mso-bookmark\:)?_MailEndCompose">(.+)?<\/(a|span)>:', # Drop _MailEndCompose
                   ':<div dir=(3D)?"ltr">(.*?)<\/div>(.*):is', # drop Gmail "ltr" attributes
+                  ':data-cid="[^"]*":',         # drop image cid attributes
             ),
-            array('', '', '', '', '<html', '$4', '$2 $3'),
+            array('', '', '', '', '<html', '$4', '$2 $3', ''),
             $html);
 
         // HtmLawed specific config only