Skip to content

Fixes 115 FragmentWrapper.isstring handles unicode #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ Patches and suggestions
- Juan Carlos Garcia Segovia
- Mike West
- Marc DM
- Alexandre Leray
4 changes: 2 additions & 2 deletions html5lib/treewalkers/lxmletree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import, division, unicode_literals
from six import text_type
from six import text_type, string_types, binary_type

from lxml import etree
from ..treebuilders.etree import tag_regexp
Expand Down Expand Up @@ -87,7 +87,7 @@ def __init__(self, fragment_root, obj):
self.tail = ensure_str(self.obj.tail)
else:
self.tail = None
self.isstring = isinstance(obj, str) or isinstance(obj, bytes)
self.isstring = isinstance(obj, string_types) or isinstance(obj, binary_type)
# Support for bytes here is Py2
if self.isstring:
self.obj = ensure_str(self.obj)
Expand Down