Edgewall Software

Ticket #2432: web_ui.py.patch

File web_ui.py.patch, 1.4 KB (added by anonymous, 3 years ago)
  • trac/wiki/web_ui.py

    old new  
    129129            format = req.args.get('format') 
    130130            db = self.env.get_db_cnx() 
    131131            cursor = db.cursor() 
    132             cursor.execute("SELECT time,name,comment,author " 
     132            cursor.execute("SELECT time,name,comment,author,version " 
    133133                           "FROM wiki WHERE time>=%s AND time<=%s", 
    134134                           (start, stop)) 
    135             for t,name,comment,author in cursor: 
     135            for t,name,comment,author,version in cursor: 
    136136                title = '<em>%s</em> edited by %s' % ( 
    137137                        escape(name), escape(author)) 
    138138                if format == 'rss': 
    139                     href = self.env.abs_href.wiki(name) 
     139                    href = escape(self.env.abs_href.wiki(name,version=version)) 
    140140                    comment = wiki_to_html(comment or '--', self.env, db, 
    141141                                           absurls=True) 
    142142                else: 
    143                     href = self.env.href.wiki(name) 
     143                    href = escape(self.env.href.wiki(name,version=version)) 
    144144                    comment = wiki_to_oneliner(comment, self.env, db, 
    145145                                               shorten=True) 
    146146                yield 'wiki', href, title, t, author, comment