1.1 --- a/MoinShare.py Fri Jun 14 15:59:21 2013 +0200
1.2 +++ b/MoinShare.py Fri Jun 14 18:01:52 2013 +0200
1.3 @@ -164,14 +164,11 @@
1.4
1.5 if "text/html" in update.preferred:
1.6 parser_cls = getParserClass(request, format)
1.7 - parser = parser_cls(body, request)
1.8
1.9 if format == "html":
1.10 update.content = body
1.11 - elif hasattr(parser, "formatForOutputType"):
1.12 - s = codecs.getwriter("utf-8")(StringIO())
1.13 - parser.formatForOutputType("text/html", write=s.write)
1.14 - update.content = unicode(s.getvalue(), "utf-8")
1.15 + elif hasattr(parser_cls, "formatForOutputType"):
1.16 + update.content = formatTextForOutputType(body, request, parser_cls, "text/html")
1.17 else:
1.18 fmt = request.html_formatter
1.19 fmt.setPage(page)