Skip to content

Commit

Permalink
Fix unicode issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarisari committed Dec 2, 2019
1 parent 826ac7d commit 29cf141
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dk/html/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,11 @@ def __str__(self):
res = []
for item in self.flatten():
try:
# res.append(u8(item))
res.append(item)
if isinstance(item, unicode):
res.append(item.encode("u8"))
else:
# res.append(u8(item))
res.append(item)
except TypeError:
# generator found for some reason
six.print_(type(item), dir(item))
Expand Down

0 comments on commit 29cf141

Please sign in to comment.