from .tool.func import * def preview_2(conn, name): curs = conn.cursor() if acl_check(name) == 1: return re_error('/ban') new_data = re.sub('^\r\n', '', flask.request.form.get('content', None)) new_data = re.sub('\r\n$', '', new_data) end_data = render_set( title = name, data = new_data ) if flask.request.args.get('section', None): action = '?section=' + flask.request.args.get('section', None) else: action = '' js_data = edit_help_button() return easy_minify(flask.render_template(skin_check(), imp = [name, wiki_set(), custom(), other2([' (' + load_lang('preview') + ')', 0])], data = '(' + load_lang('edit_filter_rule') + ')' + js_data[0] + '''