Ticket #3263: wiki_timeline_event_diff_link-r3417.patch
| File wiki_timeline_event_diff_link-r3417.patch, 1.9 KB (added by cboos, 3 years ago) |
|---|
-
trac/wiki/web_ui.py
148 148 href = format == 'rss' and req.abs_href or req.href 149 149 db = self.env.get_db_cnx() 150 150 cursor = db.cursor() 151 cursor.execute("SELECT time,name,comment,author "151 cursor.execute("SELECT time,name,comment,author,version " 152 152 "FROM wiki WHERE time>=%s AND time<=%s", 153 153 (start, stop)) 154 for t,name,comment,author in cursor:154 for t,name,comment,author,version in cursor: 155 155 title = Markup('<em>%s</em> edited by %s', 156 156 wiki.format_page_name(name), author) 157 157 if format == 'rss': … … 160 160 else: 161 161 comment = wiki_to_oneliner(comment, self.env, db, 162 162 shorten=True) 163 if version > 1: 164 diff_link = html.A('diff', href=href.wiki( 165 name, action='diff', version=version, 166 old_version=version-1)) 167 comment = Markup('%s (%s)', comment, diff_link) 163 168 yield 'wiki', href.wiki(name), title, t, author, comment 164 169 165 170 # Attachments -
trac/util/markup.py
102 102 as is. Escaping quotes is generally only required for strings that are 103 103 to be used in attribute values. 104 104 """ 105 if isinstance(text, cls):105 if isinstance(text, (cls, Element)): 106 106 return text 107 107 text = unicode(text) 108 108 if not text:
