We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92ed92a commit a106d6cCopy full SHA for a106d6c
html5lib/serializer/htmlserializer.py
@@ -1,5 +1,5 @@
1
from __future__ import absolute_import, division, unicode_literals
2
-from six import text_type
+from six import string_types
3
4
try:
5
from functools import reduce
@@ -155,14 +155,14 @@ def __init__(self, **kwargs):
155
self.strict = False
156
157
def encode(self, string):
158
- assert(isinstance(string, text_type))
+ assert(isinstance(string, string_types))
159
if self.encoding:
160
return string.encode(self.encoding, unicode_encode_errors)
161
else:
162
return string
163
164
def encodeStrict(self, string):
165
166
167
return string.encode(self.encoding, "strict")
168
0 commit comments