screenplain icon indicating copy to clipboard operation
screenplain copied to clipboard

py2/py3 - always use string object in re.sub

Open pztrick opened this issue 8 years ago • 1 comments

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.

pztrick avatar Jun 07 '16 17:06 pztrick

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.

vilcans avatar Jun 07 '16 22:06 vilcans