screenplain
screenplain copied to clipboard
py2/py3 - always use string object in re.sub
Needs to be tested on actual python2 project/environment for compatibility.
Python3 returns a bytes
object which re.sub
cries about. I also was not sure if there was reason for usage of ascii
encoding so I switched to utf-8
.
I think the ascii encoding is needed to make sure special characters are encoded as XML entities instead of being kept, but I can't check it right now.