This commit is contained in:
Kovid Goyal 2012-04-20 14:20:09 +05:30
parent abe11a17dc
commit 819b76f657

View File

@ -65,7 +65,7 @@ def tostring(raw, **kwargs):
if xml_declaration: if xml_declaration:
ans = '<?xml version="1.0" encoding="UTF-8"?>\n' + ans ans = '<?xml version="1.0" encoding="UTF-8"?>\n' + ans
return re.sub(r'&#x([0-9A-Fa-f]+);', lambda m:mychr(int(m.group(1), 16)), return re.sub(r'&#x([0-9A-Fa-f]+);', lambda m:mychr(int(m.group(1), 16)),
ans) ans).encode('utf-8')
class Chunk(object): class Chunk(object):