@@ -1,5 +1,4 @@
import os
-import json
import sqlite3
import hashlib
import threading
@@ -14,8 +14,7 @@ def login_2(conn):
return re_error('/error/13')
else:
captcha_post('', 0)
-
- ip = ip_check()
+
agent = flask.request.headers.get('User-Agent')
curs.execute("select pw, encode from user where id = ?", [flask.request.form.get('id', None)])
@@ -384,6 +384,7 @@ def namu(conn, data, title, main_num):
backlink = []
end_data = []
+ data = re.sub('<math>(?P<in>(?:(?!<\/math>).)+)<\/math>', '[math(\g<in>)]', data)
data = html.escape(data)
data = re.sub('\r\n', '\n', data)