changeset 48934 | 06de08b36c82 |
parent 48932 | 176f1a0d15dc |
child 49020 | 1138674ecdb8 |
--- 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])