Index: trac/wiki/web_ui.py
===================================================================
--- trac/wiki/web_ui.py	(revision 3417)
+++ trac/wiki/web_ui.py	(working copy)
@@ -148,10 +148,10 @@
             href = format == 'rss' and req.abs_href or req.href
             db = self.env.get_db_cnx()
             cursor = db.cursor()
-            cursor.execute("SELECT time,name,comment,author "
+            cursor.execute("SELECT time,name,comment,author,version "
                            "FROM wiki WHERE time>=%s AND time<=%s",
                            (start, stop))
-            for t,name,comment,author in cursor:
+            for t,name,comment,author,version in cursor:
                 title = Markup('<em>%s</em> edited by %s',
                                wiki.format_page_name(name), author)
                 if format == 'rss':
@@ -160,6 +160,11 @@
                 else:
                     comment = wiki_to_oneliner(comment, self.env, db,
                                                shorten=True)
+                    if version > 1:
+                        diff_link = html.A('diff', href=href.wiki(
+                            name, action='diff', version=version,
+                            old_version=version-1))
+                        comment = Markup('%s (%s)', comment, diff_link)
                 yield 'wiki', href.wiki(name), title, t, author, comment
 
             # Attachments
Index: trac/util/markup.py
===================================================================
--- trac/util/markup.py	(revision 3417)
+++ trac/util/markup.py	(working copy)
@@ -102,7 +102,7 @@
         as is. Escaping quotes is generally only required for strings that are
         to be used in attribute values.
         """
-        if isinstance(text, cls):
+        if isinstance(text, (cls, Element)):
             return text
         text = unicode(text)
         if not text:

