Commit 6ab2d256 authored by Amos Latteier's avatar Amos Latteier

Fixed a problem with ElementWithTitle.getAttribues returning attribute values, not Attr nodes.

parent 2ded116f
......@@ -410,8 +410,9 @@ class ElementWithTitle(Element):
def getAttributes(self):
"""Returns a NamedNodeMap containing the attributes
of this node (if it is an element) or None otherwise."""
if self.getAttribute('title'):
return NamedNodeMap({'title' : self.title})
title = self.getAttributeNode('title')
if title is not None:
return NamedNodeMap({'title':title})
return NamedNodeMap()
def getAttribute(self, name):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment