- Notifications
You must be signed in to change notification settings - Fork294
Closed
Description
all over the in the file html5lib/treewalkers/_base.py there are places where isinstance is used and the variable is compared to six.text_type instead of six.string_types
On Python 2, six.text_type = unicode, this means that if an attribute of value passed in is str, then there will be an assertion error.
on Python 2:
- six.string_types = (basestring,)
- six.text_type = unicode
on Python 3:
- six.string_types = (builtins.str, )
- six.text_type = builtins.str
So I think the values should be compared against six.string_types and then six.text_type be used to coerce them for output.