minirst: explicitly decode substitutions
Caught by Augie and sys.setdefaultencoding("undefined")
--- a/mercurial/minirst.py Fri May 30 12:12:03 2014 -0700
+++ b/mercurial/minirst.py Fri Jun 13 14:14:02 2014 -0500
@@ -56,7 +56,7 @@
# on strings in local encoding causes invalid byte sequences.
utext = text.decode(encoding.encoding)
for f, t in substs:
- utext = utext.replace(f, t)
+ utext = utext.replace(f.decode("ascii"), t.decode("ascii"))
return utext.encode(encoding.encoding)
_blockre = re.compile(r"\n(?:\s*\n)+")