Skip to content

Commit 23926b1

Browse files
committed
Fix beautifulsoup treewalker
1 parent f3820f9 commit 23926b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/html5lib/treewalkers/soup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
_ = gettext.gettext
44

55
from BeautifulSoup import BeautifulSoup, Declaration, Comment, Tag
6-
6+
from html5lib.constants import namespaces
77
import _base
88

99
class TreeWalker(_base.NonRecursiveTreeWalker):
@@ -44,8 +44,8 @@ def getNodeDetails(self, node):
4444
return _base.TEXT, node
4545

4646
elif isinstance(node, Tag): # Element
47-
return _base.ELEMENT, node.name, \
48-
dict(node.attrs).items(), node.contents
47+
return (_base.ELEMENT, namespaces["html"], node.name,
48+
dict(node.attrs).items(), node.contents)
4949
else:
5050
return _base.UNKNOWN, node.__class__.__name__
5151

0 commit comments

Comments
 (0)