X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Fsp%2Fxhtml.py;h=36b9d602f3e95e0cd497a3f923d969bc0194b042;hb=84a8cc4a9a8e91dfe0dcb245474af32d3a5dc613;hp=5f1ca45eda7608e53a3f592283f474cf4fb2c334;hpb=babf3e21cb06bf867e3ec98003d4a077090b8839;p=wrw.git diff --git a/wrw/sp/xhtml.py b/wrw/sp/xhtml.py index 5f1ca45..36b9d60 100644 --- a/wrw/sp/xhtml.py +++ b/wrw/sp/xhtml.py @@ -19,7 +19,7 @@ class xhtmlcontext(_cons.context): def addattr(self, node, k, v): k = str(k) - node.attrs[self.attrmap.get(k, k)] = str(v) + super().addattr(node, self.attrmap.get(k, k), v) def cons(ctx=None): if ctx is None: ctx = xhtmlcontext() @@ -41,7 +41,7 @@ class htmlformatter(util.formatter): allowshort = set(["br", "hr", "img", "input", "meta", "link"]) def element(self, el, **extra): if el.name in self.allowshort: - super(htmlformatter, self).element(el, **extra) + super().element(el, **extra) else: self.longtag(el, **extra)