Index: diff.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/diff/diff.css,v
retrieving revision 1.7.4.2
diff -u -p -r1.7.4.2 diff.css
--- diff.css	10 Jul 2009 15:10:51 -0000	1.7.4.2
+++ diff.css	17 Jul 2010 05:15:45 -0000
@@ -28,8 +28,11 @@ table.diff-inline-revisions td { vertica
  * Inline diff markup
  */
 span.diff-deleted { color:#ccc; }
+span.diff-deleted img { border: solid 2px #ccc; }
 span.diff-changed { background:#ffb; }
+span.diff-changed img { border:solid 2px #ffb; }
 span.diff-added { background:#cfc; }
+span.diff-added img { border: solid 2px #cfc; }
 
 /**
  * Traditional split diff theming
Index: diff.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/diff/diff.module,v
retrieving revision 1.23.2.3.2.14
diff -u -p -r1.23.2.3.2.14 diff.module
--- diff.module	19 Nov 2009 15:31:26 -0000	1.23.2.3.2.14
+++ diff.module	17 Jul 2010 05:16:08 -0000
@@ -32,8 +32,8 @@ function diff_help($path, $arg) {
  */
 function diff_menu() {
   $items = array();
-  
-  /** 
+
+  /**
    * By using MENU_LOCAL_TASK (and 'tab_parent') we can get the various revision-views to
    * show the View|Edit|Revision-tabs of the node on top, and have the Revisions-tab open.
    * To avoid creating/showing any extra tabs or sub-tabs (tasks below top level) for the
@@ -43,7 +43,7 @@ function diff_menu() {
    * sharing a parent that can be accessed by its full path, it seems to work as desired.
    * Breadcrumbs work decently, at least the node link is among the crumbs. For some reason
    * any breadcrumbs "before/above" the node is only seen at 'node/%node/revisions/%/view'.
-   */ 
+   */
   $items['node/%node/revisions/list'] = array(
     // Not used directly, but was created to get the other menu items to work well
     'title' => 'List revisions',
@@ -170,7 +170,10 @@ function diff_nodeapi(&$node, $op, $teas
       // is actually an older revision to diff against.
       if ($old && !empty($_SESSION['diff_inline_highlight'])) {
         module_load_include('inc', 'diff', 'diff.pages');
-        $node->content['body']['#value'] = diff_inline_diff($node, $old);        
+        $display = diff_inline_diff($node, $old);
+        $node->content = array();
+        $node->content['diff_inline'] = array('#value' => theme('diff_inline_controls', $node), '#weight' => -100);
+        $node->content['body'] = array('#value'=>$display);
       }
     }
   }
Index: diff.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/diff/Attic/diff.pages.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 diff.pages.inc
--- diff.pages.inc	20 Sep 2009 23:49:02 -0000	1.1.2.2
+++ diff.pages.inc	17 Jul 2010 05:16:09 -0000
@@ -390,15 +390,18 @@ function _diff_default_header($old_heade
  */
 function diff_inline_diff($node, $target_vid) {
   module_load_include('php', 'diff', 'DiffEngine');
-  $new = drupal_clone($node);
+  $new = node_build_content(drupal_clone($node));
+  unset($new->content['diff_inline']);
+  $new = drupal_render($new->content);
 
   // We could use a node_load() / node_prepare() combo here but for now
   // we would rather save queries...
-  $old = db_fetch_object(db_query("SELECT body, format FROM {node_revisions} WHERE nid = %d AND vid = %d", $node->nid, $target_vid));
-  $old->body = check_markup($old->body, $old->format, FALSE);
+  $old = node_build_content(node_load($node->nid, $target_vid, TRUE));
+  unset($old->content['diff_inline']);
+  $old = drupal_render($old->content);
 
-  $new = preg_split('/(<[^>]+?>| )/', $new->body, -1, PREG_SPLIT_DELIM_CAPTURE);
-  $old = preg_split('/(<[^>]+?>| )/', $old->body, -1, PREG_SPLIT_DELIM_CAPTURE);
+  $new = preg_split('/(<[^>]+?>| )/', $new, -1, PREG_SPLIT_DELIM_CAPTURE);
+  $old = preg_split('/(<[^>]+?>| )/', $old, -1, PREG_SPLIT_DELIM_CAPTURE);
 
   $diff = new Diff($old, $new);
   $diff->edits = _diff_inline_process_edits($diff->edits);
@@ -422,9 +425,8 @@ function diff_inline_diff($node, $target
         break;
       default:
         $chunk->closing = _diff_inline_process_chunk($chunk->closing);
-
         foreach ($chunk->closing as $i => $piece) {
-          if ($piece === ' ' || (strpos($piece, '<') === 0 && substr($piece, strlen($piece) - 1) === '>')) {
+          if ($piece === ' ' || (strpos($piece, '<') === 0 && substr($piece, strlen($piece) - 1) === '>' && strtolower(substr($piece, 1, 3)) != 'img')) {
             $output .= $piece;
           }
           else {
