return head
class htmlformatter(util.formatter):
- allowshort = set(["br", "hr", "img", "input"])
+ 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)
def forreq(req, tree):
# XXX: Use proper Content-Type for clients accepting it.
req.ohead["Content-Type"] = "text/html; charset=utf-8"
- buf = io.StringIO()
+ buf = io.BytesIO()
htmlindenter.output(buf, tree, doctype=(doctype, dtd), charset="utf-8")
return [buf.getvalue()]