def get_upload_text_data(handler):
try:
text_data = {}
text_data['result'] = 'fail'
text_data['con'] = tornado.escape.xhtml_escape(handler.get_argument('con')).replace('&nbsp',' ').replace('<br>','<br>')
text_data['title1'] = tornado.escape.xhtml_escape(handler.get_argument('title1')).replace('&nbsp',' ').replace('<br>','<br>')
text_data['title2'] = tornado.escape.xhtml_escape(handler.get_argument('title2')).replace('&nbsp',' ').replace('<br>','<br>')
text_data['description'] = tornado.escape.xhtml_escape(handler.get_argument('description')).replace('<br>','<br>').replace('&nbsp',' ')
text_data['year'] = tornado.escape.xhtml_escape(handler.get_argument('year'))
text_data['month'] = tornado.escape.xhtml_escape(handler.get_argument('month'))
text_data['background_color'] = tornado.escape.xhtml_escape(handler.get_argument('background_color'))
text_data['result'] = 'success'
return text_data
except Exception as e:
print(str(e))
return text_data
评论列表
文章目录