Skip to content

Commit d0779a2

Browse files
committed
Support unicode text in CDATA fields by leaving the unicode strings alone
1 parent 88f3471 commit d0779a2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

xmltodict.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ def CharacterData(self, data):
7373
"""SAX character data event handler"""
7474
if data.strip():
7575
data = data.replace("&lt;", "<")
76-
data = data.encode()
7776
if self._inCode:
7877
if self._mthdCode:
79-
self._mthdCode += "%s%s" % (code_linesep, data)
78+
self._mthdCode += u"%s%s" % (code_linesep, data)
8079
else:
8180
self._mthdCode = data
8281
else:

0 commit comments

Comments
 (0)