Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9.1, 0.9.1.1, and 0.9.2

stable logview: fix escaping issues on treeview markup

Closes #759

There were 2 issues:
* Tags and branch names must be escaped
* 'BRANCH' column should use 'text' instead of 'markup'

Changeset 8407dab2642a

Parent ef1f57118dc8

by Yuki KODAMA

Changes to 2 files · Browse files at 8407dab2642a Showing diff from parent ef1f57118dc8 Diff from another changeset...

 
156
157
158
159
 
 
160
161
162
163
164
165
166
167
 
 
168
169
170
171
172
173
 
 
174
175
176
 
156
157
158
 
159
160
161
162
163
164
165
166
 
 
167
168
169
170
171
172
 
 
173
174
175
176
177
@@ -156,21 +156,22 @@
  else:   lines = summary.splitlines()   summary = lines and lines[0] or '' - summary = gtklib.markup_escape_text(hglib.toutf(summary)) + escape = gtklib.markup_escape_text + summary = escape(hglib.toutf(summary))   node = ctx.node()   tags = self.repo.nodetags(node)   taglist = hglib.toutf(', '.join(tags))   tstr = ''   for tag in tags:   if tag not in self.hidetags: - tstr += '<span color="%s" background="%s"> %s </span> ' % \ - ('black', '#ffffaa', tag) + tstr += gtklib.markup(' %s ' % tag, color='black', + background='#ffffaa') + ' '     branch = ctx.branch()   bstr = ''   if self.branchtags.get(branch) == node: - bstr += '<span color="%s" background="%s"> %s </span> ' % \ - ('black', '#aaffaa', branch) + bstr += gtklib.markup(' %s ' % branch, color='black', + background='#aaffaa') + ' '     author = hglib.toutf(hglib.username(ctx.user()))   age = hglib.age(ctx.date())
 
423
424
425
 
426
427
428
429
430
 
423
424
425
426
427
 
428
429
430
@@ -423,8 +423,8 @@
  col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)   col.set_fixed_width(cell.get_size(self.treeview)[2])   col.pack_start(cell, expand=True) + col.add_attribute(cell, "text", treemodel.BRANCH)   col.add_attribute(cell, "foreground", treemodel.FGCOLOR) - col.add_attribute(cell, "markup", treemodel.BRANCH)     cell = gtk.CellRendererText()