When extending a view with position='attributes', prevent crash if view contains unicode char
Fixes #706
node.getparent().remove(node)
elif pos == 'attributes':
for child in spec.getiterator('attribute'):
node.getparent().remove(node)
elif pos == 'attributes':
for child in spec.getiterator('attribute'):
- attribute = (child.get('name'), child.text and child.text.encode('utf8') or None)
+ attribute = (child.get('name'), child.text or None)
if attribute[1]:
node.set(attribute[0], attribute[1])
else:
if attribute[1]:
node.set(attribute[0], attribute[1])
else: