Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templatefilters.py @ 49025:06de08b36c82
py3: use str instead of pycompat.unicode
pycompat.unicode is an alias to str.
Differential Revision: https://phab.mercurial-scm.org/D12340
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 11:24:57 -0700 |
parents | 176f1a0d15dc |
children | 1138674ecdb8 |
line wrap: on
line diff
--- a/mercurial/templatefilters.py Tue Mar 08 10:58:22 2022 +0100 +++ b/mercurial/templatefilters.py Mon Feb 21 11:24:57 2022 -0700 @@ -372,9 +372,7 @@ """Any text. Returns the input text rendered as a sequence of XML entities. """ - text = pycompat.unicode( - text, pycompat.sysstr(encoding.encoding), r'replace' - ) + text = str(text, pycompat.sysstr(encoding.encoding), r'replace') return b''.join([b'&#%d;' % ord(c) for c in text])