templatefilters: convert arguments to sysstrs for unicode() ctor
Differential Revision: https://phab.mercurial-scm.org/D2538
--- a/mercurial/templatefilters.py Fri Mar 02 07:14:59 2018 +0530
+++ b/mercurial/templatefilters.py Thu Mar 01 20:44:38 2018 -0500
@@ -273,7 +273,7 @@
"""Any text. Returns the input text rendered as a sequence of
XML entities.
"""
- text = unicode(text, encoding.encoding, 'replace')
+ text = unicode(text, pycompat.sysstr(encoding.encoding), r'replace')
return ''.join(['&#%d;' % ord(c) for c in text])
@templatefilter('permissions')