Ron Adam <[email protected]> added the comment:
The problem is in the following line...
return ''.join(v).encode(encoding, "xmlcharrefreplace")
The .encode(encoding, "xmlcharrefreplace") is returning a bytes object.
Here is the simplest change to resolve the problem.
return str(''.join(v).encode(encoding, "xmlcharrefreplace"),
encoding=encoding)
But maybe a different way to implement "xmlcharrefreplace" is what is needed.
Would it be better if it were a function or method in the xml (or html) module?
Just because it can be implemented as an encoding doesn't mean it should be.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10087>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com