Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

htmlui: use Qt.escape() in lieu of three replace calls

Changeset 79a895eec57e

Parent 5f228d648bae

by Steve Borho

Changes to one file · Browse files at 79a895eec57e Showing diff from parent 5f228d648bae Diff from another changeset...

 
8
9
10
 
11
12
13
 
34
35
36
37
38
39
 
40
41
42
 
8
9
10
11
12
13
14
 
35
36
37
 
 
 
38
39
40
41
@@ -8,6 +8,7 @@
 import os    from mercurial import ui +from PyQt4 import QtCore  from tortoisehg.hgqt import qtlib  from tortoisehg.util import hglib   @@ -34,9 +35,7 @@
    def label(self, msg, label):   msg = hglib.tounicode(msg) - msg = msg.replace('&','&amp;') - msg = msg.replace('<','&lt;') - msg = msg.replace('>','&gt;') + msg = QtCore.Qt.escape(msg)   style = qtlib.geteffect(label)   if style:   return '<pre style="%s">%s</pre>' % (style, msg)