Allow setting attributes to None as a noop, for convenience.
[wrw.git] / wrw / sp / xhtml.py
index e78d197..f10d315 100644 (file)
@@ -19,7 +19,7 @@ class xhtmlcontext(_cons.context):
 
     def addattr(self, node, k, v):
         k = unicode(k)
-        node.attrs[self.attrmap.get(k, k)] = unicode(v)
+        super(xhtmlcontext, self).addattr(node, self.attrmap.get(k, k), v)
 
 def cons(ctx=None):
     if ctx is None: ctx = xhtmlcontext()