comparison MoinMoin/converter/text_html_text_moin_wiki.py @ 3961:60b2a8ca5903

disable safari and remove gui edit button
author Byeongweon [tasyblue@gmail.com]
date Mon, 30 Jun 2008 04:26:21 +0900
parents 4fb99140c7c6
children 71b272c93293
comparison
equal deleted inserted replaced
3960:4fb99140c7c6 3961:60b2a8ca5903
1293 1293
1294 def parse(request, text): 1294 def parse(request, text):
1295 text = u'<?xml version="1.0"?>%s%s' % (dtd, text) 1295 text = u'<?xml version="1.0"?>%s%s' % (dtd, text)
1296 text = text.encode(config.charset) 1296 text = text.encode(config.charset)
1297 try: 1297 try:
1298 logname = os.path.join(request.cfg.data_dir, "expaterror.log")
1299 f = file(logname, "w")
1300 f.write(text)
1301 f.close()
1298 return xml.dom.minidom.parseString(text) 1302 return xml.dom.minidom.parseString(text)
1299 except xml.parsers.expat.ExpatError, msg: 1303 except xml.parsers.expat.ExpatError, msg:
1300 # this sometimes crashes when it should not, so save the stuff to analyze it: 1304 # this sometimes crashes when it should not, so save the stuff to analyze it:
1301 logname = os.path.join(request.cfg.data_dir, "expaterror.log") 1305 logname = os.path.join(request.cfg.data_dir, "expaterror.log")
1302 f = file(logname, "w") 1306 f = file(logname, "w")