diff --git a/includes/media.filter.inc b/includes/media.filter.inc
index 64b72a3..8ac5c88 100644
--- a/includes/media.filter.inc
+++ b/includes/media.filter.inc
@@ -208,6 +208,34 @@ function media_field_attach_delete_revision($entity_type, $entity) {
  */
 function media_filter($text) {
   $text = preg_replace_callback(MEDIA_TOKEN_REGEX, 'media_token_to_markup', $text);
+
+  $dom = filter_dom_load($text);
+  if ($dom->hasChildNodes()) {
+    $tags = array();
+    $bodys = $dom->getElementsByTagName('body');
+
+    if ($bodys->length > 0) {
+      $body = $bodys->item(0);
+      $tags = $body->getElementsByTagName('img');
+
+      foreach ($tags as $tag) {
+        if ($tag->hasAttribute('data-file_info')) {
+          $att = $tag->removeAttribute('data-file_info');
+        }
+      }
+
+      $tags = $body->getElementsByTagName('span');
+
+      foreach ($tags as $tag) {
+        if ($tag->hasAttribute('data-file_info')) {
+          $tag->removeAttribute('data-file_info');
+        }
+      }
+
+      return $dom->saveHTML($body);
+    }
+  }
+
   return $text;
 }
 
diff --git a/js/media.filter.js b/js/media.filter.js
index c1b39c9..ad26dfc 100644
--- a/js/media.filter.js
+++ b/js/media.filter.js
@@ -70,11 +70,11 @@
     },
 
     getWrapperStart: function(i) {
-      return '<!--MEDIA-WRAPPER-START-' + i + '-->';
+      return '';
     },
 
     getWrapperEnd: function(i) {
-      return '<!--MEDIA-WRAPPER-END-' + i + '-->';
+      return '';
     },
 
     /**
