Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Decode binary form input.
[wrw.git]
/
wrw
/
sp
/
xhtml.py
diff --git
a/wrw/sp/xhtml.py
b/wrw/sp/xhtml.py
index
5f1ca45
..
eb82f57
100644
(file)
--- 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)
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()
def cons(ctx=None):
if ctx is None: ctx = xhtmlcontext()
@@
-38,14
+38,15
@@
def head(title=None, css=None):
return head
class htmlformatter(util.formatter):
return head
class htmlformatter(util.formatter):
- allowshort =
set(["br", "hr", "img", "input", "meta", "link"])
- def
element(self, el, **extra
):
+ allowshort =
{"br", "hr", "img", "input", "meta", "link"}
+ def
shorttag(self, el
):
if el.name in self.allowshort:
if el.name in self.allowshort:
- super(
htmlformatter, self).element(el, **extra
)
+ super(
).shorttag(el
)
else:
else:
- self.longtag(el, **extra)
+ self.handle(">", el)
+ self.handle("<", el)
-class htmlindenter(util.indenter, htmlformatter):
+class htmlindenter(util.
text
indenter, htmlformatter):
pass
def forreq(req, tree):
pass
def forreq(req, tree):