Mercurial > public > mercurial-scm > hg
diff mercurial/templatefilters.py @ 43086:bbcbb82e3589
py3: stop implicitly importing unicode
We should be pycompat.unicode everywhere. It turns out we were doing this
everywhere except for one place in templatefilters!
Differential Revision: https://phab.mercurial-scm.org/D7006
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 06 Oct 2019 14:51:45 -0400 |
parents | 687b865b95ad |
children | e8cf9ad52a78 |
line wrap: on
line diff
--- a/mercurial/templatefilters.py Sun Oct 06 13:28:56 2019 -0400 +++ b/mercurial/templatefilters.py Sun Oct 06 14:51:45 2019 -0400 @@ -367,7 +367,7 @@ """Any text. Returns the input text rendered as a sequence of XML entities. """ - text = unicode(text, pycompat.sysstr(encoding.encoding), r'replace') + text = pycompat.unicode(text, pycompat.sysstr(encoding.encoding), r'replace') return b''.join([b'&#%d;' % ord(c) for c in text])