فهرست منبع

뒷 공백 제거, 버그 수정

Surplus_Up (2DU) 6 سال پیش
والد
کامیت
9ea13d75e2
100فایلهای تغییر یافته به همراه994 افزوده شده و 993 حذف شده
  1. 77 77
      app.py
  2. 19 19
      emergency_tool.py
  3. 11 11
      language/en-US.json
  4. 1 1
      readme-en.md
  5. 1 1
      readme.md
  6. 4 4
      route/alarm.py
  7. 1 1
      route/alarm_del.py
  8. 1 1
      route/api_raw.py
  9. 1 1
      route/api_recent_change.py
  10. 1 1
      route/api_search.py
  11. 7 7
      route/api_topic_sub.py
  12. 1 1
      route/api_user_info.py
  13. 1 1
      route/api_version.py
  14. 3 3
      route/api_w.py
  15. 15 15
      route/edit.py
  16. 11 11
      route/edit_delete.py
  17. 11 11
      route/edit_many_delete.py
  18. 21 21
      route/edit_move.py
  19. 15 15
      route/edit_req.py
  20. 12 12
      route/edit_revert.py
  21. 14 14
      route/func_upload.py
  22. 25 25
      route/give_acl.py
  23. 8 8
      route/give_admin.py
  24. 9 9
      route/give_admin_groups.py
  25. 2 2
      route/give_history_hidden.py
  26. 12 12
      route/give_user_ban.py
  27. 11 11
      route/give_user_check.py
  28. 4 4
      route/inter_wiki.py
  29. 3 3
      route/inter_wiki_del.py
  30. 23 23
      route/inter_wiki_plus.py
  31. 5 5
      route/list_acl.py
  32. 5 5
      route/list_admin.py
  33. 3 3
      route/list_admin_use.py
  34. 14 14
      route/list_block.py
  35. 3 3
      route/list_give.py
  36. 3 3
      route/list_not_close_topic.py
  37. 3 3
      route/list_old_page.py
  38. 6 6
      route/list_please.py
  39. 5 5
      route/list_title_index.py
  40. 5 5
      route/list_user.py
  41. 9 9
      route/list_user_topic.py
  42. 14 14
      route/login.py
  43. 22 22
      route/login_check_key.py
  44. 7 7
      route/login_need_email.py
  45. 30 30
      route/login_oauth.py
  46. 5 5
      route/login_pw_change.py
  47. 11 11
      route/login_register.py
  48. 1 1
      route/main_file.py
  49. 1 1
      route/main_image_view.py
  50. 16 16
      route/main_manager.py
  51. 2 2
      route/main_other.py
  52. 1 1
      route/main_skin_set.py
  53. 1 1
      route/main_views.py
  54. 30 29
      route/recent_changes.py
  55. 8 8
      route/recent_discuss.py
  56. 1 1
      route/recent_history_delete.py
  57. 3 3
      route/recent_history_tool.py
  58. 8 8
      route/search_deep.py
  59. 2 2
      route/server_now_update.py
  60. 1 1
      route/server_restart.py
  61. 70 70
      route/setting.py
  62. 5 5
      route/setting_adsense.py
  63. 11 11
      route/setting_oauth.py
  64. 50 50
      route/tool/func.py
  65. 7 7
      route/tool/mark.py
  66. 2 2
      route/tool/set_mark/markdown.py
  67. 147 147
      route/tool/set_mark/namumark.py
  68. 8 8
      route/tool/set_mark/tool.py
  69. 18 18
      route/topic.py
  70. 2 2
      route/topic_admin.py
  71. 3 3
      route/topic_block.py
  72. 14 14
      route/topic_close_list.py
  73. 1 1
      route/topic_delete.py
  74. 7 7
      route/topic_stop.py
  75. 2 2
      route/topic_tool.py
  76. 3 3
      route/topic_top.py
  77. 1 1
      route/user_count_edit.py
  78. 3 3
      route/user_custom_head_view.py
  79. 3 3
      route/user_info.py
  80. 5 5
      route/user_setting.py
  81. 4 4
      route/user_tool.py
  82. 3 3
      route/view_diff_data.py
  83. 3 3
      route/view_down.py
  84. 9 9
      route/view_raw.py
  85. 24 24
      route/view_read.py
  86. 9 9
      route/view_xref.py
  87. 2 2
      route/watch_list.py
  88. 2 2
      route/watch_list_name.py
  89. 3 3
      views/main_css/js/do_insert_data.js
  90. 4 4
      views/main_css/js/do_open_folding.js
  91. 1 1
      views/main_css/js/do_open_foot.js
  92. 1 1
      views/main_css/js/do_stop_exit.js
  93. 5 5
      views/main_css/js/dummy_do_open_foot.js
  94. 2 2
      views/main_css/js/load_include.js
  95. 1 1
      views/main_css/js/load_preview.js
  96. 1 1
      views/main_css/js/load_user_info.js
  97. 1 1
      views/main_css/js/load_ver.js
  98. 3 3
      views/main_css/js/render_html.js
  99. 1 1
      views/main_css/js/render_markdown.js
  100. 3 3
      views/main_css/js/shotcuts_set.js

+ 77 - 77
app.py

@@ -32,13 +32,13 @@ while 1:
             break
     except:
         if os.getenv('NAMU_DB') != None or os.getenv('NAMU_DB_TYPE') != None:
-            set_data = { 
-                "db" : os.getenv('NAMU_DB') if os.getenv('NAMU_DB') else 'data', 
+            set_data = {
+                "db" : os.getenv('NAMU_DB') if os.getenv('NAMU_DB') else 'data',
                 "db_type" : os.getenv('NAMU_DB_TYPE') if os.getenv('NAMU_DB_TYPE') else 'sqlite'
             }
 
             break
-        else:        
+        else:
             new_json = ['', '']
             normal_db_type = ['sqlite', 'mysql']
 
@@ -61,14 +61,14 @@ while 1:
             new_json[1] = str(input())
             if new_json[1] == '':
                 new_json[1] = 'data'
-                
+
             with open('data/set.json', 'w') as f:
                 f.write('{ "db" : "' + new_json[1] + '", "db_type" : "' + new_json[0] + '" }')
-                
+
             set_data = json.loads(open('data/set.json').read())
-            
+
             break
-        
+
 print('DB name : ' + set_data['db'])
 print('DB type : ' + set_data['db_type'])
 
@@ -94,12 +94,12 @@ if set_data['db_type'] == 'mysql':
 
         with open('data/mysql.json', 'w') as f:
             f.write('{ "user" : "' + new_json[0] + '", "password" : "' + new_json[1] + '" }')
-                
+
         set_data_mysql = json.loads(open('data/mysql.json').read())
 
     conn = pymysql.connect(
-        host = 'localhost', 
-        user = set_data_mysql['user'], 
+        host = 'localhost',
+        user = set_data_mysql['user'],
         password = set_data_mysql['password'],
         charset = 'utf8mb4'
     )
@@ -114,7 +114,7 @@ if set_data['db_type'] == 'mysql':
 else:
     conn = sqlite3.connect(set_data['db'] + '.db', check_same_thread = False)
     curs = conn.cursor()
-            
+
 if os.path.exists(set_data['db'] + '.db'):
     setup_tool = 0
 else:
@@ -143,26 +143,26 @@ app.url_map.converters['everything'] = EverythingConverter
 
 create_data = {}
 create_data['all_data'] = [
-    'data', 
-    'cache_data', 
-    'history', 
-    'rd', 
+    'data',
+    'cache_data',
+    'history',
+    'rd',
     'user',
     'user_set',
-    'ban', 
-    'topic', 
-    'rb', 
-    'back', 
-    'custom', 
-    'other', 
-    'alist', 
-    're_admin', 
-    'alarm', 
-    'ua_d', 
-    'filter', 
-    'scan', 
-    'acl', 
-    'inter', 
+    'ban',
+    'topic',
+    'rb',
+    'back',
+    'custom',
+    'other',
+    'alist',
+    're_admin',
+    'alarm',
+    'ua_d',
+    'filter',
+    'scan',
+    'acl',
+    'inter',
     'html_filter',
     'oauth_conn',
 ]
@@ -214,8 +214,8 @@ if setup_tool != 0:
                 curs.execute(db_change('select ' + create + ' from ' + create_table + ' limit 1'))
             except:
                 curs.execute(db_change("alter table " + create_table + " add " + create + " longtext default ''"))
-                
-            try:    
+
+            try:
                 curs.execute(db_change('create index index_' + create_table + '_' + create + ' on ' + create_table + '(' + create + ')'))
             except:
                 pass
@@ -230,7 +230,7 @@ if not curs.fetchall():
 
 if not os.path.exists(app_var['path_data_image']):
     os.makedirs(app_var['path_data_image'])
-    
+
 if not os.path.exists('views'):
     os.makedirs('views')
 
@@ -245,14 +245,14 @@ for i in range(len(server_set_key)):
     server_set_val = curs.fetchall()
     if not server_set_val:
         server_set_val = server_init.init(server_set_key[i])
-        
+
         curs.execute(db_change('insert into other (name, data) values (?, ?)'), [server_set_key[i], server_set_val])
         conn.commit()
     else:
         server_set_val = server_set_val[0][0]
-    
+
     print(dislay_set_key[i] + ' : ' + server_set_val)
-    
+
     server_set[server_set_key[i]] = server_set_val
 
 curs.execute(db_change('select data from other where name = "key"'))
@@ -278,7 +278,7 @@ if set_data['db_type'] == 'sqlite':
         print('----')
         try:
             shutil.copyfile(set_data['db'] + '.db', 'back_' + set_data['db'] + '.db')
-            
+
             print('Back up : OK')
         except:
             print('Back up : Error')
@@ -288,15 +288,15 @@ if set_data['db_type'] == 'sqlite':
     try:
         curs.execute(db_change('select data from other where name = "back_up"'))
         back_up_time = curs.fetchall()
-        
+
         back_time = int(back_up_time[0][0])
     except:
         back_time = 0
-        
+
     print('----')
     if back_time != 0:
         print('Back up state : ' + str(back_time) + ' hours')
-        
+
         back_up()
     else:
         print('Back up state : Turn off')
@@ -360,15 +360,15 @@ def list_acl():
 @app.route('/admin_plus/<name>', methods=['POST', 'GET'])
 def give_admin_groups(name = None):
     return give_admin_groups_2(conn, name)
-        
+
 @app.route('/admin_list')
 def list_admin():
     return list_admin_2(conn)
-        
+
 @app.route('/hidden/<everything:name>')
 def give_history_hidden(name = None):
     return give_history_hidden_2(conn, name)
-        
+
 @app.route('/user_log')
 def list_user():
     return list_user_2(conn)
@@ -396,7 +396,7 @@ def setting_oauth():
 @app.route('/adsense_setting', methods=['GET', 'POST'])
 def setting_adsense():
     return setting_adsense_2(conn)
-        
+
 @app.route('/xref/<everything:name>')
 def view_xref(name = None):
     return view_xref_2(conn, name)
@@ -404,7 +404,7 @@ def view_xref(name = None):
 @app.route('/please')
 def list_please():
     return list_please_2(conn)
-        
+
 @app.route('/recent_discuss')
 def recent_discuss():
     return recent_discuss_2(conn)
@@ -413,7 +413,7 @@ def recent_discuss():
 @app.route('/<regex("block_user|block_admin"):tool>/<name>')
 def list_block(name = None, tool = None):
     return list_block_2(conn, name, tool)
-            
+
 @app.route('/search', methods=['POST'])
 def search():
     return search_2(conn)
@@ -426,12 +426,12 @@ def search_goto(name = 'test'):
 @app.route('/search/<everything:name>')
 def search_deep(name = 'test'):
     return search_deep_2(conn, name)
-         
+
 @app.route('/raw/<everything:name>')
 @app.route('/thread/<int:topic_num>/raw/<int:num>')
 def view_raw(name = None, topic_num = None, num = None):
     return view_raw_2(conn, name, topic_num, num)
-        
+
 @app.route('/revert/<everything:name>', methods=['POST', 'GET'])
 def edit_revert(name = None):
     return edit_revert_2(conn, name)
@@ -443,15 +443,15 @@ def edit(name = 'Test'):
 @app.route('/edit_req/<everything:name>', methods=['POST', 'GET'])
 def edit_req(name = 'Test'):
     return edit_req_2(conn, name)
-        
+
 @app.route('/delete/<everything:name>', methods=['POST', 'GET'])
 def edit_delete(name = None):
-    return edit_delete_2(conn, name, app_var)  
+    return edit_delete_2(conn, name, app_var)
 
 @app.route('/many_delete', methods=['POST', 'GET'])
 def edit_many_delete(name = None):
-    return edit_many_delete_2(conn, app_var)     
-            
+    return edit_many_delete_2(conn, app_var)
+
 @app.route('/move/<everything:name>', methods=['POST', 'GET'])
 def edit_move(name = None):
     return edit_move_2(conn, name)
@@ -459,24 +459,24 @@ def edit_move(name = None):
 @app.route('/other')
 def main_other():
     return main_other_2(conn)
-    
+
 @app.route('/manager', methods=['POST', 'GET'])
 @app.route('/manager/<int:num>', methods=['POST', 'GET'])
 def main_manager(num = 1):
     return main_manager_2(conn, num, version_list['master']['r_ver'])
-        
+
 @app.route('/title_index')
 def list_title_index():
     return list_title_index_2(conn)
-                
+
 @app.route('/thread/<int:topic_num>/b/<int:num>')
 def topic_block(topic_num = 1, num = 1):
     return topic_block_2(conn, topic_num, num)
-        
+
 @app.route('/thread/<int:topic_num>/notice/<int:num>')
 def topic_top(topic_num = 1, num = 1):
     return topic_top_2(conn, topic_num, num)
-                
+
 @app.route('/thread/<int:topic_num>/setting', methods=['POST', 'GET'])
 def topic_stop(topic_num = 1):
     return topic_stop_2(conn, topic_num)
@@ -496,7 +496,7 @@ def topic_admin(topic_num = 1, num = 1):
 @app.route('/thread/<int:topic_num>', methods=['POST', 'GET'])
 def topic(topic_num = 1):
     return topic_2(conn, topic_num)
-        
+
 @app.route('/topic/<everything:name>', methods=['POST', 'GET'])
 def topic_close_list(name = 'test'):
     return topic_close_list_2(conn, name)
@@ -504,7 +504,7 @@ def topic_close_list(name = 'test'):
 @app.route('/tool/<name>')
 def user_tool(name = None):
     return user_tool_2(conn, name)
-            
+
 @app.route('/login', methods=['POST', 'GET'])
 def login():
     return login_2(conn)
@@ -512,11 +512,11 @@ def login():
 @app.route('/oauth/<regex("discord|naver|facebook|kakao"):platform>/<regex("init|callback"):func>', methods=['GET', 'POST'])
 def login_oauth(platform = None, func = None):
     return login_oauth_2(conn, platform, func)
-                
+
 @app.route('/change', methods=['POST', 'GET'])
 def user_setting():
     return user_setting_2(conn, server_init)
-    
+
 @app.route('/pw_change', methods=['POST', 'GET'])
 def login_pw_change():
     return login_pw_change_2(conn)
@@ -524,7 +524,7 @@ def login_pw_change():
 @app.route('/check/<name>')
 def give_user_check(name = None):
     return give_user_check_2(conn, name)
-                
+
 @app.route('/register', methods=['POST', 'GET'])
 def login_register():
     return login_register_2(conn)
@@ -536,31 +536,31 @@ def login_need_email(tool = 'pass_find'):
 @app.route('/<regex("check_key|check_pass_key|email_replace"):tool>', methods=['POST', 'GET'])
 def login_check_key(tool = 'check_pass_key'):
     return login_check_key_2(conn, tool)
-           
+
 @app.route('/logout')
 def login_logout():
     return login_logout_2(conn)
-    
+
 @app.route('/ban', methods=['POST', 'GET'])
 @app.route('/ban/<name>', methods=['POST', 'GET'])
 def give_user_ban(name = None):
-    return give_user_ban_2(conn, name)         
-                
+    return give_user_ban_2(conn, name)
+
 @app.route('/acl/<everything:name>', methods=['POST', 'GET'])
 def give_acl(name = None):
     return give_acl_2(conn, name)
-            
+
 @app.route('/admin/<name>', methods=['POST', 'GET'])
 def give_admin(name = None):
     return give_admin_2(conn, name)
-    
+
 @app.route('/diff/<everything:name>')
 def view_diff_data(name = None):
     return view_diff_data_2(conn, name)
-        
+
 @app.route('/down/<everything:name>')
 def view_down(name = None):
-    return view_down_2(conn, name)   
+    return view_down_2(conn, name)
 
 @app.route('/w/<everything:name>')
 def view_read(name = None):
@@ -579,7 +579,7 @@ def recent_changes(name = None, tool = 'record'):
 @app.route('/history_tool/<everything:name>')
 def recent_history_tool(name = None):
     return recent_history_tool_2(conn, name)
-    
+
 @app.route('/history_delete/<everything:name>', methods=['POST', 'GET'])
 def recent_history_delete(name = None):
     return recent_history_delete_2(conn, name)
@@ -587,7 +587,7 @@ def recent_history_delete(name = None):
 @app.route('/upload', methods=['GET', 'POST'])
 def func_upload():
     return func_upload_2(conn)
-        
+
 @app.route('/user')
 def user_info():
     return user_info_2(conn)
@@ -608,7 +608,7 @@ def user_custom_head_view():
 @app.route('/count/<name>')
 def user_count_edit(name = None):
     return user_count_edit_2(conn, name)
-        
+
 @app.route('/random')
 def func_title_random():
     return func_title_random_2(conn)
@@ -620,12 +620,12 @@ def main_image_view(name = None):
 @app.route('/skin_set')
 def main_skin_set():
     return main_skin_set_2(conn)
-    
+
 # API
 @app.route('/api/w/<everything:name>', methods=['POST', 'GET'])
 def api_w(name = ''):
     return api_w_2(conn, name)
-    
+
 @app.route('/api/raw/<everything:name>')
 def api_raw(name = ''):
     return api_raw_2(conn, name)
@@ -658,7 +658,7 @@ def api_search(name = ''):
 @app.route('/api/recent_changes')
 def api_recent_change():
     return api_recent_change_2(conn)
-    
+
 # File
 @app.route('/views/<everything:name>')
 def main_views(name = None):
@@ -672,7 +672,7 @@ def main_file(data = None):
 @app.errorhandler(404)
 def main_error_404(e):
     return main_error_404_2(conn)
-    
+
 app.secret_key = rep_key
 app.wsgi_app = werkzeug.debug.DebuggedApplication(app.wsgi_app, True)
 app.debug = True
@@ -680,5 +680,5 @@ app.debug = True
 if __name__ == "__main__":
     http_server = tornado.httpserver.HTTPServer(tornado.wsgi.WSGIContainer(app))
     http_server.listen(server_set['port'], address = server_set['host'])
-    
+
     tornado.ioloop.IOLoop.instance().start()

+ 19 - 19
emergency_tool.py

@@ -15,13 +15,13 @@ while 1:
             break
     except:
         if os.getenv('NAMU_DB') != None or os.getenv('NAMU_DB_TYPE') != None:
-            set_data = { 
-                "db" : os.getenv('NAMU_DB') if os.getenv('NAMU_DB') else 'data', 
+            set_data = {
+                "db" : os.getenv('NAMU_DB') if os.getenv('NAMU_DB') else 'data',
                 "db_type" : os.getenv('NAMU_DB_TYPE') if os.getenv('NAMU_DB_TYPE') else 'sqlite'
             }
 
             break
-        else:        
+        else:
             new_json = ['', '']
             normal_db_type = ['sqlite', 'mysql']
 
@@ -44,14 +44,14 @@ while 1:
             new_json[1] = str(input())
             if new_json[1] == '':
                 new_json[1] = 'data'
-                
+
             with open('data/set.json', 'w') as f:
                 f.write('{ "db" : "' + new_json[1] + '", "db_type" : "' + new_json[0] + '" }')
-                
+
             set_data = json.loads(open('data/set.json').read())
-            
+
             break
-        
+
 print('DB name : ' + set_data['db'])
 print('DB type : ' + set_data['db_type'])
 
@@ -77,12 +77,12 @@ if set_data['db_type'] == 'mysql':
 
         with open('data/mysql.json', 'w') as f:
             f.write('{ "user" : "' + new_json[0] + '", "password" : "' + new_json[1] + '" }')
-                
+
         set_data_mysql = json.loads(open('data/mysql.json').read())
 
     conn = pymysql.connect(
-        host = 'localhost', 
-        user = set_data_mysql['user'], 
+        host = 'localhost',
+        user = set_data_mysql['user'],
         password = set_data_mysql['password'],
         charset = 'utf8mb4'
     )
@@ -131,7 +131,7 @@ if what_i_do == '1':
         num += 1
         if num % 100 == 0:
             print(num)
-            
+
         render_do(test[0], test[1], 1, None)
 elif what_i_do == '2':
     curs.execute(db_change("delete from other where name = 'recaptcha'"))
@@ -146,12 +146,12 @@ elif what_i_do == '3':
     else:
         band = ''
 
-        curs.execute(db_change("insert into rb (block, end, today, blocker, why, band) values (?, ?, ?, ?, ?, ?)"), 
-            [user_data, 
-            'release', 
-            get_time(), 
-            'tool:emergency', 
-            '', 
+        curs.execute(db_change("insert into rb (block, end, today, blocker, why, band) values (?, ?, ?, ?, ?, ?)"),
+            [user_data,
+            'release',
+            get_time(),
+            'tool:emergency',
+            '',
             band
         ])
     curs.execute(db_change("delete from ban where block = ?"), [user_data])
@@ -177,7 +177,7 @@ elif what_i_do == '7':
     print('----')
     print('1. sha256')
     print('2. sha3')
-    
+
     print('----')
     print('Select : ', end = '')
     what_i_do = int(input())
@@ -197,7 +197,7 @@ elif what_i_do == '7':
             hashed = sha3.sha3_256(bytes(user_pw, 'utf-8')).hexdigest()
         else:
             hashed = hashlib.sha3_256(bytes(user_pw, 'utf-8')).hexdigest()
-       
+
     curs.execute(db_change("update user set pw = ? where id = ?"), [hashed, user_name])
 elif what_i_do == '8':
     curs.execute(db_change("update other set data = '00000' where name = 'ver'"))

+ 11 - 11
language/en-US.json

@@ -20,8 +20,8 @@
         "host" : "Host",
         "port" : "Port",
         "restart" : "Restart",
-        "document_name" : "Document's name",
-        "discussion_name" : "Discussion's topic",
+        "document_name" : "Document[s] name",
+        "discussion_name" : "Discussion[s] topic",
         "user_name" : "Username",
         "go" : "Go",
         "document" : "Document",
@@ -128,8 +128,8 @@
         "edit_filter_rule" : "Contents filter rule",
         "move_history" : "History of move",
         "other_tool" : "Other tools",
-        "admin_tool" : "Administrator's tools",
-        "check_user" : "Check user's login history",
+        "admin_tool" : "Administrator[s] tools",
+        "check_user" : "Check user[s] login history",
         "compare_target" : "Comparison target name",
         "authorize" : "Authorize",
         "indexing" : "DB Indexing",
@@ -168,8 +168,8 @@
         "edit_button_paragraph" : "Paragraph",
         "password_change" : "Password change",
         "email_change" : "Change email",
-        "acl_change" : "Change document's ACL",
-        "user_tool" : "User's tools",
+        "acl_change" : "Change document[s] ACL",
+        "user_tool" : "User[s] tools",
         "skin_info" : "Skin information",
         "closed_discussion" : "Closed discussion",
         "agreed_discussion" : "Agreed discussion",
@@ -216,13 +216,13 @@
                 "main_body" : "Top of body",
                 "main_bottom_body" : "Bottom of body",
             "_comment_2.2.2_" : "Main",
-                "wiki_name" : "Wiki's name",
-                "wiki_logo" : "Wiki's logo",
+                "wiki_name" : "Wiki[s] name",
+                "wiki_logo" : "Wiki[s] logo",
                 "main_page" : "Main page",
                 "bottom_text" : "Bottom text",
                 "max_file_size" : "Max file size",
                 "backup_interval" : "Backup Cycles",
-                "wiki_skin" : "Wiki's default Skin",
+                "wiki_skin" : "Wiki[s] default Skin",
                 "no_register" : "No sign-up",
                 "hide_ip" : "Hide IP address",
                 "wiki_host" : "Wiki host address",
@@ -308,7 +308,7 @@
         "update_warring" : "Manual updates are recommended if your version is 0.2 or lower than the latest version. For Windows, the contents of the route folder disappear.",
         "defalut_edit_help" : "Describe it here",
         "markup_enabled" : "Markup enabled",
-        "many_delete_help" : "Please write down the document's name one by one on the line.",
+        "many_delete_help" : "Please write down the document[s] name one by one on the line.",
         "sqlite_only" : "SQLite only",
         "_comment_3.1_" : "Error",
             "update_error" : "Auto update is not supported.",
@@ -332,7 +332,7 @@
             "password_diffrent_error" : "Reconfirm password and input password are different.",
             "edit_filter_error" : "Censored by edit filter.",
             "file_name_error" : "Only alphabet, hangul, space, underscore, and minus signs are allowed for file names.",
-            "topic_long_error" : "The discussion's topic must not exceed 256 characters.",
+            "topic_long_error" : "The discussion[s] topic must not exceed 256 characters.",
             "email_error" : "No one has this email.",
             "regex_error" : "There is an error in the regular expression.",
             "decument_404_error" : "This document does not exist.",

+ 1 - 1
readme-en.md

@@ -56,7 +56,7 @@ You can clone this repository by entering the following command at the terminal
 openNAMU may have some untested bugs. Your use of openNAMU and bug discovery will help develop openNAMU.
 [[Create Issues]](https://github.com/2du/openNAMU/issues/new)
 
-openNAMU is a complete open source project. Add new features and create pull requests. 
+openNAMU is a complete open source project. Add new features and create pull requests.
 [[Create Pull Requests]](https://github.com/2du/openNAMU/compare)
 
 # Lisence

+ 1 - 1
readme.md

@@ -38,7 +38,7 @@
 
 ### 포함된 외부 프로젝트
  * Quotes icon - [Dave Gandy](http://www.flaticon.com/free-icon/quote-left_25672)
- * Syntax highlighting - [highlightjs](https://highlightjs.org/) 
+ * Syntax highlighting - [highlightjs](https://highlightjs.org/)
  * Numerical expression - [MathJax](https://www.mathjax.org/)
  * Handling Keyboard Shortcuts [shortcut.js](http://www.openjs.com/scripts/events/keyboard_shortcuts/)
 

+ 4 - 4
route/alarm.py

@@ -9,8 +9,8 @@ def alarm_2(conn):
     else:
         sql_num = 0
 
-    data = '<ul>'    
-    
+    data = '<ul>'
+
     curs.execute(db_change("select data, date from alarm where name = ? order by date desc limit ?, 50"), [ip_check(), sql_num])
     data_list = curs.fetchall()
     if data_list:
@@ -18,10 +18,10 @@ def alarm_2(conn):
 
         for data_one in data_list:
             data += '<li>' + data_one[0] + ' (' + data_one[1] + ')</li>'
-    
+
     data += '</ul>' + next_fix('/alarm?num=', num, data_list)
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('notice'), wiki_set(), custom(), other2([0, 0])],
         data = data,
         menu = [['user', load_lang('return')]]

+ 1 - 1
route/alarm_del.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def alarm_del_2(conn):
     curs = conn.cursor()
-    
+
     curs.execute(db_change("delete from alarm where name = ?"), [ip_check()])
     conn.commit()
 

+ 1 - 1
route/api_raw.py

@@ -8,7 +8,7 @@ def api_raw_2(conn, name):
         data = curs.fetchall()
         if data:
             json_data = { "title" : name, "data" : render_set(title = name, data = data[0][0], s_data = 1) }
-        
+
             return flask.jsonify(json_data)
         else:
             return flask.jsonify({})

+ 1 - 1
route/api_recent_change.py

@@ -14,7 +14,7 @@ def api_recent_change_2(conn):
     if page * num > 0:
         page = page * num - num
     else:
-        page = 0   
+        page = 0
 
     curs.execute(db_change('' + \
         'select id, title, date, ip, send, leng from history ' + \

+ 1 - 1
route/api_search.py

@@ -14,7 +14,7 @@ def api_search_2(conn, name):
     if page * num > 0:
         page = page * num - num
     else:
-        page = 0   
+        page = 0
 
     curs.execute(db_change('select data from other where name = "count_all_title"'))
     if int(curs.fetchall()[0][0]) < 10000:

+ 7 - 7
route/api_topic_sub.py

@@ -9,8 +9,8 @@ def api_topic_sub_2(conn, topic_num):
 
     if flask.request.args.get('num', None):
         curs.execute(db_change("select id, data, date, ip, block, top from topic where title = ? and sub = ? and id + 0 = ? + 0 order by id + 0 asc"), [
-            name, 
-            sub, 
+            name,
+            sub,
             flask.request.args.get('num', '')
         ])
     elif flask.request.args.get('top', None):
@@ -22,7 +22,7 @@ def api_topic_sub_2(conn, topic_num):
     if data:
         json_data = {}
         admin = admin_check(3)
-                    
+
         for i in data:
             ip = ip_pas(i[3])
 
@@ -55,7 +55,7 @@ def api_topic_sub_2(conn, topic_num):
                             s_user = g_data[0][0]
                         else:
                             s_user = ''
-                    
+
                 if flask.request.args.get('top', None):
                     t_color = 'toron_color_red'
                 elif i[3] == s_user and i[5] != '1':
@@ -67,10 +67,10 @@ def api_topic_sub_2(conn, topic_num):
 
                 if admin == 1 or b_color != 'toron_color_not':
                     ip += ' <a href="/thread/' + str(topic_num) + '/admin/' + i[0] + '">(' + load_lang('discussion_tool') + ')</a>'
-                    
+
                 if t_data_f == '':
                     t_data_f = '[br]'
-            
+
                 all_data = '' + \
                     '<table id="toron">' + \
                         '<tbody>' + \
@@ -86,7 +86,7 @@ def api_topic_sub_2(conn, topic_num):
                     '</table>' + \
                     '<hr class="main_hr">' + \
                 ''
-                
+
                 json_data[i[0]] = {
                     "data" : all_data
                 }

+ 1 - 1
route/api_user_info.py

@@ -28,7 +28,7 @@ def api_user_info_2(conn, name):
                 </tbody>
             </table>
         '''
-        
+
         curs.execute(db_change("select acl from user where id = ?"), [name])
         data = curs.fetchall()
         if data:

+ 1 - 1
route/api_version.py

@@ -21,7 +21,7 @@ def api_version_2(conn, r_ver, c_ver):
                 n_ver = json_data[up_data]['r_ver']
         except:
             pass
-        
+
     json_data = { "version" : r_ver, "db_version" : c_ver, "lastest_version" : n_ver  }
 
     return flask.jsonify(json_data)

+ 3 - 3
route/api_w.py

@@ -13,7 +13,7 @@ def api_w_2(conn, name):
         if acl_check(name, 'render') != 1:
             if flask.request.method == 'POST':
                 g_data = render_set(title = name, data = flask.request.form.get('data', ''), num = 2)
-                
+
                 return flask.jsonify({ "title" : name, "data" : g_data[0], "js_data" : g_data[1] })
             else:
                 curs.execute(db_change("select data from data where title = ?"), [name])
@@ -22,10 +22,10 @@ def api_w_2(conn, name):
                     if flask.request.args.get('include', 'include_1'):
                         include_re = re.compile('\[include\(((?:(?!\)\]).)+)\)\]', re.I)
                         category_re = re.compile('\[\[(?:(?:category|분류):(?:(?!\[\[|\]\]).)+)\]\]', re.I)
-                        
+
                         json_data = include_re.sub('', data[0][0])
                         json_data = category_re.sub('', json_data, )
-                        
+
                         g_data = render_set(title = name, data = json_data, num = 2, include = flask.request.args.get('include', 'include_1'))
                     else:
                         json_data = g_data[0]

+ 15 - 15
route/edit.py

@@ -11,7 +11,7 @@ def edit_2(conn, name):
 
     if acl_check(name) == 1:
         return redirect('/edit_req/' + url_pas(name))
-    
+
     if flask.request.method == 'POST':
         if captcha_post(flask.request.form.get('g-recaptcha-response', '')) == 1:
             return re_error('/error/13')
@@ -26,15 +26,15 @@ def edit_2(conn, name):
 
         if flask.request.form.get('otent', '') == content:
             return redirect('/w/' + url_pas(name))
-        
+
         if edit_filter_do(content) == 1:
             return re_error('/error/21')
 
         content = savemark(content)
-        
+
         if old:
             leng = leng_check(len(flask.request.form.get('otent', '')), len(content))
-            
+
             if section:
                 content = old[0][0].replace(flask.request.form.get('otent', ''), content)
         else:
@@ -52,10 +52,10 @@ def edit_2(conn, name):
         for scan_user in curs.fetchall():
             curs.execute(db_change("insert into alarm (name, data, date) values (?, ?, ?)"), [
                 scan_user[0],
-                ip + ' | <a href="/w/' + url_pas(name) + '">' + name + '</a> | Edit', 
+                ip + ' | <a href="/w/' + url_pas(name) + '">' + name + '</a> | Edit',
                 today
             ])
-                
+
         history_plus(
             name,
             content,
@@ -64,20 +64,20 @@ def edit_2(conn, name):
             flask.request.form.get('send', ''),
             leng
         )
-        
+
         curs.execute(db_change("delete from back where link = ?"), [name])
         curs.execute(db_change("delete from back where title = ? and type = 'no'"), [name])
-        
+
         render_set(
             title = name,
             data = content,
             num = 1
         )
-        
+
         conn.commit()
-        
+
         return redirect('/w/' + url_pas(name))
-    else:            
+    else:
         if old:
             if section:
                 data = re.sub('\n(?P<in>={1,6})', '<br>\g<in>', html.escape('\n' + re.sub('\r\n', '\n', old[0][0]) + '\n'))
@@ -88,7 +88,7 @@ def edit_2(conn, name):
                     if g_data:
                         if int(section) - 1 == i:
                             data = html.unescape(re.sub('<br>(?P<in>={1,6})', '\n\g<in>', g_data.groups()[0]))
-                            
+
                             break
                         else:
                             data = re.sub('((?:<br>)(?:(?:(?!\n|<br>).)+)(?:\n*(?:(?:(?!<br>).)+\n*)+)?)', '\n', data, 1)
@@ -100,7 +100,7 @@ def edit_2(conn, name):
                 data = old[0][0]
         else:
             data = ''
-            
+
         data_old = data
         get_name = ''
 
@@ -109,7 +109,7 @@ def edit_2(conn, name):
                 <a href="/manager/15?plus=''' + url_pas(name) + '">(' + load_lang('load') + ')</a> <a href="/edit_filter">(' + load_lang('edit_filter_rule') + ''')</a>
                 <hr class=\"main_hr\">
             '''
-            
+
         if flask.request.args.get('plus', None):
             curs.execute(db_change("select data from data where title = ?"), [flask.request.args.get('plus', 'test')])
             get_data = curs.fetchall()
@@ -134,7 +134,7 @@ def edit_2(conn, name):
         else:
             p_text = load_lang('defalut_edit_help')
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + sub + ')', 0])],
             data =  get_name + '''
                 <form method="post">

+ 11 - 11
route/edit_delete.py

@@ -6,7 +6,7 @@ def edit_delete_2(conn, name, app_var):
     ip = ip_check()
     if acl_check(name) == 1:
         return re_error('/ban')
-    
+
     if flask.request.method == 'POST':
         if captcha_post(flask.request.form.get('g-recaptcha-response', '')) == 1:
             return re_error('/error/13')
@@ -21,21 +21,21 @@ def edit_delete_2(conn, name, app_var):
         if data:
             today = get_time()
             leng = '-' + str(len(data[0][0]))
-            
+
             history_plus(
-                name, 
-                '', 
-                today, 
-                ip, 
-                flask.request.form.get('send', ''), 
+                name,
+                '',
+                today,
+                ip,
+                flask.request.form.get('send', ''),
                 leng,
                 'delete'
             )
-            
+
             curs.execute(db_change("select title, link from back where title = ? and not type = 'cat' and not type = 'no'"), [name])
             for data in curs.fetchall():
                 curs.execute(db_change("insert into back (title, link, type) values (?, ?, 'no')"), [data[0], data[1]])
-            
+
             curs.execute(db_change("delete from back where link = ?"), [name])
             curs.execute(db_change("delete from data where title = ?"), [name])
             conn.commit()
@@ -50,14 +50,14 @@ def edit_delete_2(conn, name, app_var):
 
         curs.execute(db_change('select data from other where name = "count_all_title"'))
         curs.execute(db_change("update other set data = ? where name = 'count_all_title'"), [str(int(curs.fetchall()[0][0]) - 1)])
-            
+
         return redirect('/w/' + url_pas(name))
     else:
         curs.execute(db_change("select title from data where title = ?"), [name])
         if not curs.fetchall():
             return redirect('/w/' + url_pas(name))
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + load_lang('delete') + ')', 0])],
             data =  '''
                     <form method="post">

+ 11 - 11
route/edit_many_delete.py

@@ -6,7 +6,7 @@ def edit_many_delete_2(conn, app_var):
     ip = ip_check()
     if admin_check() != 1:
         return re_error('/ban')
-    
+
     if flask.request.method == 'POST':
         all_title = re.findall(r'([^\n]+)\n', flask.request.form.get('content', '').replace('\r\n', '\n') + '\n')
         for name in all_title:
@@ -15,21 +15,21 @@ def edit_many_delete_2(conn, app_var):
             if data:
                 today = get_time()
                 leng = '-' + str(len(data[0][0]))
-                
+
                 history_plus(
-                    name, 
-                    '', 
-                    today, 
-                    ip, 
-                    flask.request.form.get('send', ''), 
+                    name,
+                    '',
+                    today,
+                    ip,
+                    flask.request.form.get('send', ''),
                     leng,
                     'delete'
                 )
-                
+
                 curs.execute(db_change("select title, link from back where title = ? and not type = 'cat' and not type = 'no'"), [name])
                 for data in curs.fetchall():
                     curs.execute(db_change("insert into back (title, link, type) values (?, ?, 'no')"), [data[0], data[1]])
-                
+
                 curs.execute(db_change("delete from back where link = ?"), [name])
                 curs.execute(db_change("delete from data where title = ?"), [name])
                 conn.commit()
@@ -44,10 +44,10 @@ def edit_many_delete_2(conn, app_var):
 
             curs.execute(db_change('select data from other where name = "count_all_title"'))
             curs.execute(db_change("update other set data = ? where name = 'count_all_title'"), [str(int(curs.fetchall()[0][0]) - 1)])
-                
+
         return redirect('/recent_changes')
     else:
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('many_delete'), wiki_set(), custom(), other2([0, 0])],
             data = '''
                 <form method="post">

+ 21 - 21
route/edit_move.py

@@ -20,26 +20,26 @@ def edit_move_2(conn, name):
             if admin_check(None, 'merge documents') == 1:
                 curs.execute(db_change("select data from data where title = ?"), [flask.request.form.get('title', None)])
                 data = curs.fetchall()
-                if data:            
+                if data:
                     curs.execute(db_change("delete from data where title = ?"), [flask.request.form.get('title', None)])
                     curs.execute(db_change("delete from back where link = ?"), [flask.request.form.get('title', None)])
-                
+
                 curs.execute(db_change("select data from data where title = ?"), [name])
                 data = curs.fetchall()
-                if data:            
+                if data:
                     curs.execute(db_change("update data set title = ? where title = ?"), [flask.request.form.get('title', None), name])
                     curs.execute(db_change("update back set link = ? where link = ?"), [flask.request.form.get('title', None), name])
-                    
+
                     data_in = data[0][0]
                 else:
                     data_in = ''
 
                 history_plus(
-                    name, 
-                    data_in, 
-                    get_time(), 
-                    ip_check(), 
-                    flask.request.form.get('send', ''), 
+                    name,
+                    data_in,
+                    get_time(),
+                    ip_check(),
+                    flask.request.form.get('send', ''),
                     '0',
                     'marge <a>' + name + '</a> - <a>' + flask.request.form.get('title', 'test') + '</a> move'
                 )
@@ -49,7 +49,7 @@ def edit_move_2(conn, name):
 
                 curs.execute(db_change("select id from history where title = ? order by id + 0 desc limit 1"), [flask.request.form.get('title', None)])
                 data = curs.fetchall()
-                
+
                 num = data[0][0]
 
                 curs.execute(db_change("select id from history where title = ? order by id + 0 asc"), [name])
@@ -65,24 +65,24 @@ def edit_move_2(conn, name):
         else:
             curs.execute(db_change("select data from data where title = ?"), [name])
             data = curs.fetchall()
-            if data:            
+            if data:
                 curs.execute(db_change("update data set title = ? where title = ?"), [flask.request.form.get('title', None), name])
                 curs.execute(db_change("update back set link = ? where link = ?"), [flask.request.form.get('title', None), name])
-                
+
                 data_in = data[0][0]
             else:
                 data_in = ''
-                
+
             history_plus(
-                name, 
-                data_in, 
-                get_time(), 
-                ip_check(), 
-                flask.request.form.get('send', ''), 
+                name,
+                data_in,
+                get_time(),
+                ip_check(),
+                flask.request.form.get('send', ''),
                 '0',
                 '<a>' + name + '</a> - <a>' + flask.request.form.get('title', 'test') + '</a> move'
             )
-            
+
             curs.execute(db_change("update back set type = 'no' where title = ? and not type = 'cat' and not type = 'no'"), [name])
             curs.execute(db_change("delete from back where title = ? and not type = 'cat' and type = 'no'"), [flask.request.form.get('title', None)])
 
@@ -90,8 +90,8 @@ def edit_move_2(conn, name):
             conn.commit()
 
             return redirect('/w/' + url_pas(flask.request.form.get('title', None)))
-    else:            
-        return easy_minify(flask.render_template(skin_check(), 
+    else:
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + load_lang('move') + ')', 0])],
             data =  '''
                     <form method="post">

+ 15 - 15
route/edit_req.py

@@ -18,7 +18,7 @@ def edit_req_2(conn, name):
             return redirect('/edit/' + url_pas(name))
         else:
             get_ver = int(number_check(get_ver))
-        
+
     if not get_ver:
         curs.execute(db_change("select data from data where title = ?"), [name])
         old = curs.fetchall()
@@ -29,7 +29,7 @@ def edit_req_2(conn, name):
         old = curs.fetchall()
         if not old:
             return redirect('/w/' + url_pas(name))
-    
+
     if flask.request.method == 'POST':
         if captcha_post(flask.request.form.get('g-recaptcha-response', '')) == 1:
             return re_error('/error/13')
@@ -47,15 +47,15 @@ def edit_req_2(conn, name):
 
             if flask.request.form.get('otent', '') == content:
                 return redirect('/w/' + url_pas(name))
-            
+
             if edit_filter_do(content) == 1:
                 return re_error('/error/21')
 
         content = savemark(content)
-        
+
         if old:
             leng = leng_check(len(flask.request.form.get('otent', '')), len(content))
-            
+
             if section:
                 content = old[0][0].replace(flask.request.form.get('otent', ''), content)
         else:
@@ -74,21 +74,21 @@ def edit_req_2(conn, name):
             for scan_user in curs.fetchall():
                 curs.execute(db_change("insert into alarm (name, data, date) values (?, ?, ?)"), [
                     scan_user[0],
-                    ip + ' | <a href="/w/' + url_pas(name) + '">' + name + '</a> | Edit', 
+                    ip + ' | <a href="/w/' + url_pas(name) + '">' + name + '</a> | Edit',
                     today
                 ])
 
             curs.execute(db_change("update history set type = '', send = ? where title = ? and id = ? and ip = ? and date = ? and type = 'req'"), [
-                old[0][1] + ' (' + ip + ' pass)', 
+                old[0][1] + ' (' + ip + ' pass)',
                 name,
                 str(get_ver),
                 old[0][2],
                 old[0][3]
             ])
-            
+
             curs.execute(db_change("delete from back where link = ?"), [name])
             curs.execute(db_change("delete from back where title = ? and type = 'no'"), [name])
-            
+
             render_set(
                 title = name,
                 data = content,
@@ -105,23 +105,23 @@ def edit_req_2(conn, name):
                 '',
                 'req'
             )
-        
+
         conn.commit()
-        
+
         if get_ver:
             return redirect('/w/' + url_pas(name))
         else:
             return redirect('/recent_changes?set=req')
-    else:            
+    else:
         if old:
             data = old[0][0]
         else:
             data = ''
-            
+
         data_old = data
         get_name = ''
 
-        save_button = load_lang('edit_req') if not get_ver else load_lang('edit_req_check') 
+        save_button = load_lang('edit_req') if not get_ver else load_lang('edit_req_check')
         menu_plus = [[]]
         sub = load_lang('edit_req')
         disable = '' if not get_ver else 'disabled'
@@ -140,7 +140,7 @@ def edit_req_2(conn, name):
         else:
             p_text = load_lang('defalut_edit_help')
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + sub + ')', 0])],
             data =  get_name + '''
                 <form method="post">

+ 12 - 12
route/edit_revert.py

@@ -20,7 +20,7 @@ def edit_revert_2(conn, name):
 
         if slow_edit_check() == 1:
             return re_error('/error/24')
-    
+
         curs.execute(db_change("select data from history where title = ? and id = ?"), [name, str(num)])
         data = curs.fetchall()
         if data:
@@ -29,8 +29,8 @@ def edit_revert_2(conn, name):
 
         curs.execute(db_change("delete from back where link = ?"), [name])
         conn.commit()
-        
-        if data:                                
+
+        if data:
             curs.execute(db_change("select data from data where title = ?"), [name])
             data_old = curs.fetchall()
             if data_old:
@@ -39,13 +39,13 @@ def edit_revert_2(conn, name):
             else:
                 leng = '+' + str(len(data[0][0]))
                 curs.execute(db_change("insert into data (title, data) values (?, ?)"), [name, data[0][0]])
-                
+
             history_plus(
-                name, 
-                data[0][0], 
-                get_time(), 
-                ip_check(), 
-                flask.request.form.get('send', ''), 
+                name,
+                data[0][0],
+                get_time(),
+                ip_check(),
+                flask.request.form.get('send', ''),
                 leng,
                 'r' + str(num) + ''
             )
@@ -55,16 +55,16 @@ def edit_revert_2(conn, name):
                 data = data[0][0],
                 num = 1
             )
-            
+
             conn.commit()
-            
+
         return redirect('/w/' + url_pas(name))
     else:
         curs.execute(db_change("select title from history where title = ? and id = ?"), [name, str(num)])
         if not curs.fetchall():
             return redirect('/w/' + url_pas(name))
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + load_lang('revert') + ')', 0])],
             data =  '''
                     <form method="post">

+ 14 - 14
route/func_upload.py

@@ -5,7 +5,7 @@ def func_upload_2(conn):
 
     if acl_check(None, 'upload') == 1:
         return re_error('/ban')
-    
+
     if flask.request.method == 'POST':
         if captcha_post(flask.request.form.get('g-recaptcha-response', '')) == 1:
             return re_error('/error/13')
@@ -18,16 +18,16 @@ def func_upload_2(conn):
 
         if int(wiki_set(3)) * 1024 * 1024 < flask.request.content_length:
             return re_error('/error/17')
-        
+
         value = os.path.splitext(data.filename)[1]
         if not value in ['.jpeg', '.jpg', '.gif', '.png', '.webp', '.JPEG', '.JPG', '.GIF', '.PNG', '.WEBP']:
             return re_error('/error/14')
-    
+
         if flask.request.form.get('f_name', None):
             name = flask.request.form.get('f_name', None) + value
         else:
             name = data.filename
-        
+
         piece = os.path.splitext(name)
         if re.search('[^ㄱ-힣0-9a-zA-Z_\- ]', piece[0]):
             return re_error('/error/22')
@@ -44,7 +44,7 @@ def func_upload_2(conn):
             t_re = re.compile(i[0])
             if t_re.search(name):
                 return redirect('/file_filter')
-            
+
         ip = ip_check()
 
         if flask.request.form.get('f_lice_sel', 'direct_input') == 'direct_input':
@@ -63,16 +63,16 @@ def func_upload_2(conn):
                 lice += ' : '  + flask.request.form.get('f_lice', None)
 
             lice += '[[category:' + re.sub('\]', '_', flask.request.form.get('f_lice_sel', None)) + ']]'
-            
+
         if os.path.exists(os.path.join(app_var['path_data_image'], e_data)):
             os.remove(os.path.join(app_var['path_data_image'], e_data))
-            
+
             data.save(os.path.join(app_var['path_data_image'], e_data))
         else:
             data.save(os.path.join(app_var['path_data_image'], e_data))
 
         file_d = '[[file:' + name + ']][br][br]{{{[[file:' + name + ']]}}}[br][br]' + lice
-        
+
         curs.execute(db_change("insert into data (title, data) values (?, ?)"), ['file:' + name, file_d])
         curs.execute(db_change("insert into acl (title, decu, dis, why, view) values (?, 'admin', '', '', '')"), ['file:' + name])
 
@@ -85,16 +85,16 @@ def func_upload_2(conn):
         history_plus(
             'file:' + name,
             file_d,
-            get_time(), 
-            ip, 
+            get_time(),
+            ip,
             ip,
             '0',
             'upload'
         )
-        
+
         conn.commit()
-        
-        return redirect('/w/file:' + name)      
+
+        return redirect('/w/file:' + name)
     else:
         license_list = '''
             <option value="direct_input">''' + load_lang('direct_input') + '''</option>
@@ -107,7 +107,7 @@ def func_upload_2(conn):
                 <option value="''' + i[0] + '''">''' + i[0] + '''</option>
             '''
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('upload'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
                 <a href="/file_filter">(''' + load_lang('file_filter_list') + ''')</a>

+ 25 - 25
route/give_acl.py

@@ -5,17 +5,17 @@ def give_acl_2(conn, name):
 
     check_ok = ''
     ip = ip_check()
-    
+
     if flask.request.method == 'POST':
         check_data = 'acl (' + name + ')'
     else:
         check_data = None
-    
+
     user_data = re.search('^user:(.+)$', name)
     if user_data:
         if check_data and ip_or_user(ip) != 0:
             return redirect('/login')
-        
+
         if user_data.groups()[0] != ip_check():
             if admin_check(5) != 1:
                 if check_data:
@@ -38,17 +38,17 @@ def give_acl_2(conn, name):
             curs.execute(db_change("update acl set view = ? where title = ?"), [flask.request.form.get('view', ''), name])
         else:
             curs.execute(db_change("insert into acl (title, decu, dis, why, view) values (?, ?, ?, ?, ?)"), [
-                name, 
-                flask.request.form.get('decu', ''), 
-                flask.request.form.get('dis', ''), 
-                flask.request.form.get('why', ''), 
+                name,
+                flask.request.form.get('decu', ''),
+                flask.request.form.get('dis', ''),
+                flask.request.form.get('why', ''),
                 flask.request.form.get('view', '')
             ])
-        
+
         curs.execute(db_change("select title from acl where title = ? and decu = '' and dis = '' and view = ''"), [name])
         if curs.fetchall():
             curs.execute(db_change("delete from acl where title = ?"), [name])
-            
+
         all_d = ''
         for i in ['decu', 'dis', 'view']:
             if flask.request.form.get(i, '') == '':
@@ -59,20 +59,20 @@ def give_acl_2(conn, name):
                 all_d += flask.request.form.get(i, '')
                 if i != 'view':
                     all_d += ' | '
-            
+
         admin_check(5, check_data + ' (' + all_d + ')')
 
         conn.commit()
-            
-        return redirect('/acl/' + url_pas(name))            
+
+        return redirect('/acl/' + url_pas(name))
     else:
         data = '<h2>' + load_lang('document_acl') + '</h2><hr class=\"main_hr\"><select name="decu" ' + check_ok + '>'
-    
+
         if re.search('^user:', name):
             acl_list = ['', 'user', 'all']
         else:
             acl_list = ['', 'user', 'admin', 'owner', '50_edit', 'email']
-        
+
         curs.execute(db_change("select decu from acl where title = ?"), [name])
         acl_data = curs.fetchall()
         for data_list in acl_list:
@@ -80,14 +80,14 @@ def give_acl_2(conn, name):
                 check = 'selected="selected"'
             else:
                 check = ''
-            
+
             data += '<option value="' + data_list + '" ' + check + '>' + (data_list if data_list != '' else 'normal') + '</option>'
-            
+
         data += '</select>'
-        
+
         if not re.search('^user:', name):
             data += '<hr class=\"main_hr\"><h2>' + load_lang('discussion_acl') + '</h2><hr class=\"main_hr\"><select name="dis" ' + check_ok + '>'
-        
+
             curs.execute(db_change("select dis, why, view from acl where title = ?"), [name])
             acl_data = curs.fetchall()
             for data_list in acl_list:
@@ -95,9 +95,9 @@ def give_acl_2(conn, name):
                     check = 'selected="selected"'
                 else:
                     check = ''
-                    
+
                 data += '<option value="' + data_list + '" ' + check + '>' + (data_list if data_list != '' else 'normal') + '</option>'
-                
+
             data += '</select>'
 
             data += '<hr class=\"main_hr\"><h2>' + load_lang('view_acl') + '</h2><hr class=\"main_hr\"><select name="view" ' + check_ok + '>'
@@ -106,9 +106,9 @@ def give_acl_2(conn, name):
                     check = 'selected="selected"'
                 else:
                     check = ''
-                    
+
                 data += '<option value="' + data_list + '" ' + check + '>' + (data_list if data_list != '' else 'normal') + '</option>'
-                
+
             data += '''
                 </select>
                 <hr class=\"main_hr\">
@@ -123,14 +123,14 @@ def give_acl_2(conn, name):
                     <li>owner : ''' + load_lang('owner_acl') + '''</li>
                 </ul>
             '''
-                
+
             if check_ok == '':
                 if acl_data:
                     data += '<hr class=\"main_hr\"><input value="' + html.escape(acl_data[0][1]) + '" placeholder="' + load_lang('why') + '" name="why" type="text" ' + check_ok + '>'
                 else:
                     data += '<hr class=\"main_hr\"><input placeholder="' + load_lang('why') + '" name="why" type="text" ' + check_ok + '>'
-            
-        return easy_minify(flask.render_template(skin_check(), 
+
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + load_lang('acl') + ')', 0])],
             data =  '''
                 <form method="post">

+ 8 - 8
route/give_admin.py

@@ -4,7 +4,7 @@ def give_admin_2(conn, name):
     curs = conn.cursor()
 
     owner = admin_check()
-    
+
     curs.execute(db_change("select acl from user where id = ?"), [name])
     user = curs.fetchall()
     if not user:
@@ -31,16 +31,16 @@ def give_admin_2(conn, name):
             curs.execute(db_change("update user set acl = 'user' where id = ?"), [name])
         else:
             curs.execute(db_change("update user set acl = ? where id = ?"), [flask.request.form.get('select', None), name])
-        
+
         conn.commit()
-        
-        return redirect('/admin/' + url_pas(name))            
+
+        return redirect('/admin/' + url_pas(name))
     else:
         if admin_check(7) != 1:
-            return re_error('/error/3')            
+            return re_error('/error/3')
 
         div = '<option value="X">X</option>'
-        
+
         curs.execute(db_change('select distinct name from alist order by name asc'))
         for data in curs.fetchall():
             if user[0][0] == data[0]:
@@ -52,8 +52,8 @@ def give_admin_2(conn, name):
                         div += '<option value="' + data[0] + '">' + data[0] + '</option>'
                 else:
                     div += '<option value="' + data[0] + '">' + data[0] + '</option>'
-        
-        return easy_minify(flask.render_template(skin_check(), 
+
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + load_lang('authorize') + ')', 0])],
             data =  '''
                     <form method="post">

+ 9 - 9
route/give_admin_groups.py

@@ -2,19 +2,19 @@ from .tool.func import *
 
 def give_admin_groups_2(conn, name):
     curs = conn.cursor()
-    
+
     if flask.request.method == 'POST':
         if admin_check(None, 'admin_plus (' + name + ')') != 1:
             return re_error('/error/3')
 
         curs.execute(db_change("delete from alist where name = ?"), [name])
-        
+
         if flask.request.form.get('ban', 0) != 0:
             curs.execute(db_change("insert into alist (name, acl) values (?, 'ban')"), [name])
 
         if flask.request.form.get('toron', 0) != 0:
             curs.execute(db_change("insert into alist (name, acl) values (?, 'toron')"), [name])
-            
+
         if flask.request.form.get('check', 0) != 0:
             curs.execute(db_change("insert into alist (name, acl) values (?, 'check')"), [name])
 
@@ -29,17 +29,17 @@ def give_admin_groups_2(conn, name):
 
         if flask.request.form.get('owner', 0) != 0:
             curs.execute(db_change("insert into alist (name, acl) values (?, 'owner')"), [name])
-            
+
         conn.commit()
-        
+
         return redirect('/admin_plus/' + url_pas(name))
-    else:        
+    else:
         data = '<ul>'
-        
+
         exist_list = ['', '', '', '', '', '', '', '']
 
         curs.execute(db_change('select acl from alist where name = ?'), [name])
-        acl_list = curs.fetchall()    
+        acl_list = curs.fetchall()
         for go in acl_list:
             if go[0] == 'ban':
                 exist_list[0] = 'checked="checked"'
@@ -68,7 +68,7 @@ def give_admin_groups_2(conn, name):
 
         data += '</ul>'
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2(['(' + load_lang('admin_group') + ')', 0])],
             data =  '''
                 <form method="post">

+ 2 - 2
route/give_history_hidden.py

@@ -11,7 +11,7 @@ def give_history_hidden_2(conn, name):
             curs.execute(db_change("update history set hide = '' where title = ? and id = ?"), [name, num])
         else:
             curs.execute(db_change("update history set hide = 'O' where title = ? and id = ?"), [name, num])
-            
+
         conn.commit()
-    
+
     return redirect('/history/' + url_pas(name))

+ 12 - 12
route/give_user_ban.py

@@ -15,7 +15,7 @@ def give_user_ban_2(conn, name):
 
     if ban_check(ip = ip_check(), tool = 'login') == 1:
         return re_error('/ban')
-                
+
     if flask.request.method == 'POST':
         name = name if name else flask.request.form.get('name', 'test')
 
@@ -36,15 +36,15 @@ def give_user_ban_2(conn, name):
             type_d = None
 
         ban_insert(
-            name, 
-            end, 
-            flask.request.form.get('why', ''), 
-            flask.request.form.get('login', ''), 
+            name,
+            end,
+            flask.request.form.get('why', ''),
+            flask.request.form.get('login', ''),
             ip_check(),
             type_d
         )
 
-        return redirect('/block_log')     
+        return redirect('/block_log')
     else:
         if admin_check(1) != 1:
             return re_error('/error/3')
@@ -60,7 +60,7 @@ def give_user_ban_2(conn, name):
                 data = '<ul><li>' + load_lang('limitless') + '</li>'
             else:
                 data = '<ul><li>' + load_lang('period') + ' : ' + end[0][0] + '</li>'
-                
+
             curs.execute(db_change("select block from ban where block = ? and login = 'O'"), [name])
             if curs.fetchall():
                 data += '<li>' + load_lang('login_able') + '</li>'
@@ -72,14 +72,14 @@ def give_user_ban_2(conn, name):
         else:
             if name:
                 main_name = name
-                
+
                 if name and re.search("^([0-9]{1,3}\.[0-9]{1,3})$", name):
                     b_now = load_lang('band_ban')
                 else:
                     b_now = load_lang('ban')
 
                 now = ' (' + b_now + ')'
-                    
+
                 if name and ip_or_user(name) == 1:
                     plus = '<input type="checkbox" name="login"> ' + load_lang('login_able') + '<hr class=\"main_hr\">'
                 else:
@@ -94,7 +94,7 @@ def give_user_ban_2(conn, name):
                 plus = '<input type="checkbox" name="login"> ' + load_lang('login_able') + '<hr class=\"main_hr\">'
                 now = 0
                 b_now = load_lang('ban')
-                
+
             time_data = [
                 ['86400', load_lang('1_day')],
                 ['432000‬', load_lang('5_day')],
@@ -108,7 +108,7 @@ def give_user_ban_2(conn, name):
                 insert_data += '<a href="javascript:insert_v(\'second\', \'' + i[0] + '\')">(' + i[1] + ')</a> '
 
             data = name + '''
-                <script>function insert_v(name, data) { document.getElementById(name).value = data; }</script>''' + insert_data + '''                
+                <script>function insert_v(name, data) { document.getElementById(name).value = data; }</script>''' + insert_data + '''
                 <hr class=\"main_hr\">
                 <input placeholder="''' + load_lang('ban_period') + ''' (''' + load_lang('second') + ''')" name="second" id="second" type="text">
                 <hr class=\"main_hr\">
@@ -117,7 +117,7 @@ def give_user_ban_2(conn, name):
                 <hr class=\"main_hr\">
             ''' + plus
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [main_name, wiki_set(), custom(), other2([now, 0])],
             data = '''
                 <form method="post">

+ 11 - 11
route/give_user_check.py

@@ -11,13 +11,13 @@ def give_user_check_2(conn, name):
 
     if admin_check(4, 'check (' + name + ')') != 1:
         return re_error('/error/3')
-        
+
     num = int(number_check(flask.request.args.get('num', '1')))
     if num * 50 > 0:
         sql_num = num * 50 - 50
     else:
         sql_num = 0
-    
+
     if flask.request.args.get('plus', None):
         end_check = 1
 
@@ -27,18 +27,18 @@ def give_user_check_2(conn, name):
                 ('ip' if ip_or_user(flask.request.args.get('plus', None)) == 1 else 'name') + " = ? " + \
                 "order by today desc limit ?, 50" + \
             ""), [
-            name, 
-            flask.request.args.get('plus', None), 
+            name,
+            flask.request.args.get('plus', None),
             sql_num
         ])
     else:
         end_check = 0
-        
+
         curs.execute(db_change("" + \
             "select name, ip, ua, today from ua_d " + \
             "where " + ('ip' if ip_or_user(name) == 1 else 'name') + " = ? order by today desc limit ?, 50" + \
         ""), [name, sql_num])
-    
+
     record = curs.fetchall()
     if record:
         if not flask.request.args.get('plus', None):
@@ -55,7 +55,7 @@ def give_user_check_2(conn, name):
                             <td id="main_table_width">''' + load_lang('time') + '''</td>
                         </tr>
                 '''
-        
+
         for data in record:
             if data[2]:
                 ua = data[2]
@@ -72,20 +72,20 @@ def give_user_check_2(conn, name):
                         <td colspan="3">''' + ua + '''</td>
                     </tr>
                     '''
-        
+
         div +=  '''
                     </tbody>
                 </table>
                 '''
     else:
         return re_error('/error/2')
-        
+
     if end_check == 1:
         div += next_fix('/check/' + url_pas(name) + '?plus=' + flask.request.args.get('plus', None) + '&num=', num, record)
     else:
         div += next_fix('/check/' + url_pas(name) + '?num=', num, record)
-            
-    return easy_minify(flask.render_template(skin_check(),    
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('check'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['manager', load_lang('return')]]

+ 4 - 4
route/inter_wiki.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def inter_wiki_2(conn, tools):
     curs = conn.cursor()
-    
+
     div = ''
     admin = admin_check()
 
@@ -54,14 +54,14 @@ def inter_wiki_2(conn, tools):
         title = load_lang('file_filter_list')
         div = ''
 
-        curs.execute(db_change("select html from html_filter where kind = 'file'"))  
+        curs.execute(db_change("select html from html_filter where kind = 'file'"))
     elif tools == 'image_license':
         del_link = 'del_image_license'
         plus_link = 'plus_image_license'
         title = load_lang('image_license_list')
         div = ''
 
-        curs.execute(db_change("select html from html_filter where kind = 'image_license'"))  
+        curs.execute(db_change("select html from html_filter where kind = 'image_license'"))
     else:
         del_link = 'del_edit_top'
         plus_link = 'plus_edit_top'
@@ -99,7 +99,7 @@ def inter_wiki_2(conn, tools):
         if admin == 1:
             div += '<a href="/' + plus_link + '">(' + load_lang('add') + ')</a>'
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [title, wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['manager/1', load_lang('return')]]

+ 3 - 3
route/inter_wiki_del.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def inter_wiki_del_2(conn, tools, name):
     curs = conn.cursor()
-    
+
     if admin_check(None, tools) == 1:
         if tools == 'del_inter_wiki':
             curs.execute(db_change("delete from inter where title = ?"), [name])
@@ -15,10 +15,10 @@ def inter_wiki_del_2(conn, tools, name):
         elif tools == 'del_email_filter':
             curs.execute(db_change("delete from html_filter where html = ? and kind = 'email'"), [name])
         elif tools == 'del_image_license':
-            curs.execute(db_change("delete from html_filter where html = ? and kind = 'image_license'"), [name])    
+            curs.execute(db_change("delete from html_filter where html = ? and kind = 'image_license'"), [name])
         else:
             curs.execute(db_change("delete from html_filter where html = ? and kind = 'edit_top'"), [name])
-        
+
         conn.commit()
 
         return redirect('/' + re.sub('^del_', '', tools))

+ 23 - 23
route/inter_wiki_plus.py

@@ -2,18 +2,18 @@ from .tool.func import *
 
 def inter_wiki_plus_2(conn, tools, name):
     curs = conn.cursor()
-    
+
     if flask.request.method == 'POST':
         if tools == 'plus_inter_wiki':
             if name:
                 curs.execute(db_change("delete from inter where title = ?"), [name])
-                
+
             curs.execute(db_change('insert into inter (title, link, icon) values (?, ?, ?)'), [
-                flask.request.form.get('title', 'test'), 
+                flask.request.form.get('title', 'test'),
                 flask.request.form.get('link', 'test'),
                 flask.request.form.get('icon', '')
             ])
-            
+
             admin_check(None, 'inter_wiki_plus')
         elif tools == 'plus_edit_filter':
             if admin_check(1, 'edit_filter edit') != 1:
@@ -29,12 +29,12 @@ def inter_wiki_plus_2(conn, tools, name):
 
                 curs.execute(db_change("delete from filter where name = ?"), [name])
                 curs.execute(db_change("insert into filter (name, regex, sub) values (?, ?, ?)"), [
-                    name, 
-                    flask.request.form.get('content', 'test'), 
+                    name,
+                    flask.request.form.get('content', 'test'),
                     end
                 ])
             except:
-                return re_error('/error/23')                
+                return re_error('/error/23')
         else:
             plus_d = ''
 
@@ -42,34 +42,34 @@ def inter_wiki_plus_2(conn, tools, name):
                 try:
                     re.compile(flask.request.form.get('title', 'test'))
                 except:
-                    return re_error('/error/23') 
+                    return re_error('/error/23')
 
                 admin_check(None, 'name_filter edit')
-                
+
                 type_d = 'name'
             elif tools == 'plus_file_filter':
                 try:
                     re.compile(flask.request.form.get('title', 'test'))
                 except:
-                    return re_error('/error/23') 
-                
+                    return re_error('/error/23')
+
                 admin_check(None, 'file_filter edit')
-                
+
                 type_d = 'file'
             elif tools == 'plus_email_filter':
                 admin_check(None, 'email_filter edit')
-                
+
                 type_d = 'email'
             elif tools == 'plus_image_license':
                 admin_check(None, 'image_license edit')
-                
+
                 type_d = 'image_license'
             else:
                 admin_check(None, 'edit_top edit')
-                
+
                 type_d = 'edit_top'
                 plus_d = flask.request.form.get('markup', 'test')
-            
+
             if name:
                 curs.execute(db_change("delete from html_filter where html = ? and kind = ?"), [
                     name,
@@ -77,13 +77,13 @@ def inter_wiki_plus_2(conn, tools, name):
                 ])
 
             curs.execute(db_change('insert into html_filter (html, kind, plus) values (?, ?, ?)'), [
-                flask.request.form.get('title', 'test'), 
-                type_d, 
+                flask.request.form.get('title', 'test'),
+                type_d,
                 plus_d
             ])
-        
+
         conn.commit()
-    
+
         return redirect('/' + re.sub('^plus_', '', tools))
     else:
         if admin_check(1) != 1:
@@ -121,7 +121,7 @@ def inter_wiki_plus_2(conn, tools, name):
             exist = curs.fetchall()
             if exist:
                 textarea = exist[0][0]
-                
+
                 if exist[0][1] == 'X':
                     time_check = 'checked="checked"'
                     time_data = ''
@@ -147,7 +147,7 @@ def inter_wiki_plus_2(conn, tools, name):
 
             title = load_lang('edit_filter_add')
             form_data = '''
-                <script>function insert_v(name, data) { document.getElementById(name).value = data; }</script>''' + insert_data + '''                
+                <script>function insert_v(name, data) { document.getElementById(name).value = data; }</script>''' + insert_data + '''
                 <hr class=\"main_hr\">
                 <input placeholder="''' + load_lang('second') + '''" id="second" name="second" type="text" value="''' + html.escape(time_data) + '''">
                 <hr class=\"main_hr\">
@@ -203,7 +203,7 @@ def inter_wiki_plus_2(conn, tools, name):
                 <input value="''' + value + '''" type="text" name="markup">
             '''
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [title, wiki_set(), custom(), other2([0, 0])],
             data =  '''
                     <form method="post">

+ 5 - 5
route/list_acl.py

@@ -2,9 +2,9 @@ from .tool.func import *
 
 def list_acl_2(conn):
     curs = conn.cursor()
-    
+
     div = '<ul>'
-    
+
     curs.execute(db_change("select title, decu, dis, view, why from acl where decu != '' or dis != '' or view != '' order by title desc"))
     list_data = curs.fetchall()
     for data in list_data:
@@ -36,10 +36,10 @@ def list_acl_2(conn):
                     time_data + \
                 '</li>' + \
             ''
-        
+
     div += '</ul>'
-    
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('acl_document_list'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['other', load_lang('return')]]

+ 5 - 5
route/list_admin.py

@@ -4,19 +4,19 @@ def list_admin_2(conn):
     curs = conn.cursor()
 
     div = '<ul>'
-    
+
     curs.execute(db_change("select id, acl, date from user where not acl = 'user' order by date desc"))
     for data in curs.fetchall():
         name = ip_pas(data[0]) + ' <a href="/admin_plus/' + url_pas(data[1]) + '">(' + data[1] + ')</a>'
-        
+
         if data[2] != '':
             name += '(' + data[2] + ')'
 
         div += '<li>' + name + '</li>'
-        
+
     div += '</ul>'
-                
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('admin_list'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['other', load_lang('return')]]

+ 3 - 3
route/list_admin_use.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def list_admin_use_2(conn):
     curs = conn.cursor()
-    
+
     num = int(number_check(flask.request.args.get('num', '1')))
     if num * 50 > 0:
         sql_num = num * 50 - 50
@@ -23,13 +23,13 @@ def list_admin_use_2(conn):
             ])
 
         get_list = curs.fetchall()
-        for data in get_list:            
+        for data in get_list:
             list_data += '<li>' + ip_pas(data[0]) + ' / ' + data[1] + ' / ' + data[2] + '</li>'
 
         list_data += '</ul>'
         list_data += next_fix('/admin_log?num=', num, get_list)
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('authority_use_list'), wiki_set(), custom(), other2([0, 0])],
             data = '''
                 <form method="post">

+ 14 - 14
route/list_block.py

@@ -8,7 +8,7 @@ def list_block_2(conn, name, tool):
         sql_num = num * 50 - 50
     else:
         sql_num = 0
-    
+
     div = '''
         <table id="main_table_set">
             <tbody>
@@ -18,19 +18,19 @@ def list_block_2(conn, name, tool):
                     <td id="main_table_width">''' + load_lang('period') + '''</td>
                 </tr>
     '''
-    
+
     data_list = ''
 
     curs.execute(db_change("delete from ban where (end < ? and end like '2%')"), [get_time()])
     conn.commit()
-    
-    if not name:        
+
+    if not name:
         if flask.request.args.get('type', '') == 'ongoing':
             sub = ' (' + load_lang('in_progress') + ')'
             menu = [['block_log', load_lang('normal')]]
 
             curs.execute(db_change("select why, block, '', end, '', band from ban where ((end > ? and end like '2%') or end = '') order by end desc limit ?, 50"), [
-                get_time(), 
+                get_time(),
                 sql_num
             ])
         else:
@@ -41,18 +41,18 @@ def list_block_2(conn, name, tool):
                 <a href="/manager/11">(''' + load_lang('blocked') + ''')</a> <a href="/manager/12">(''' + load_lang('admin') + ''')</a> <a href="?type=ongoing">(''' + load_lang('in_progress') + ''')</a>
                 <hr class=\"main_hr\">
             ''' + div
-            
+
             curs.execute(db_change("select why, block, blocker, end, today, band from rb order by today desc limit ?, 50"), [sql_num])
     else:
         menu = [['block_log', load_lang('normal')]]
-        
+
         if tool == 'block_user':
             sub = ' (' + load_lang('blocked') + ')'
-            
+
             curs.execute(db_change("select why, block, blocker, end, today, band from rb where block = ? order by today desc limit ?, 50"), [name, sql_num])
         else:
             sub = ' (' + load_lang('admin') + ')'
-            
+
             curs.execute(db_change("select why, block, blocker, end, today, band from rb where blocker = ? order by today desc limit ?, 50"), [name, sql_num])
 
     if data_list == '':
@@ -62,7 +62,7 @@ def list_block_2(conn, name, tool):
         why = html.escape(data[0])
         if why == '':
             why = '<br>'
-        
+
         if data[5] == 'O':
             ip = data[1] + ' (' + load_lang('range') + ')'
         elif data[5] == 'regex':
@@ -88,7 +88,7 @@ def list_block_2(conn, name, tool):
             start = ''
         else:
             start = load_lang('start') + ' : ' + data[4]
-            
+
         div += '''
             <tr>
                 <td>''' + ip + '''</td>
@@ -105,13 +105,13 @@ def list_block_2(conn, name, tool):
         '''
 
     div += '</tbody></table>'
-    
+
     if not name:
         div += next_fix('/block_log?num=', num, data_list)
     else:
         div += next_fix('/' + url_pas(tool) + '/' + url_pas(name) + '?num=', num, data_list)
-                
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('recent_ban'), wiki_set(), custom(), other2([sub, 0])],
         data = div,
         menu = menu

+ 3 - 3
route/list_give.py

@@ -7,15 +7,15 @@ def list_give_2(conn):
     back = ''
 
     curs.execute(db_change("select distinct name from alist order by name asc"))
-    for data in curs.fetchall():                      
+    for data in curs.fetchall():
         if back != data[0]:
             back = data[0]
 
         list_data += '<li><a href="/admin_plus/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'
-    
+
     list_data += '</ul><hr class=\"main_hr\"><a href="/manager/8">(' + load_lang('add') + ')</a>'
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('admin_group_list'), wiki_set(), custom(), other2([0, 0])],
         data = list_data,
         menu = [['manager', load_lang('return')]]

+ 3 - 3
route/list_not_close_topic.py

@@ -4,16 +4,16 @@ def list_not_close_topic_2(conn):
     curs = conn.cursor()
 
     div = '<ul>'
-    
+
     curs.execute(db_change('select title, sub, date from rd where stop != "O" order by date desc'))
     n_list = curs.fetchall()
     for data in n_list:
         curs.execute(db_change("select code from topic where id = '1' and title = ? and sub = ?"), [data[0], data[1]])
         div += '<li><a href="/thread/' + url_pas(curs.fetchall()[0][0]) + '">' + html.escape(data[0]) + '</a> (' + data[1] + ') | ' + data[2] + '</li>'
-            
+
     div += '</ul>'
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('open_discussion_list'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['manager', load_lang('return')]]

+ 3 - 3
route/list_old_page.py

@@ -10,7 +10,7 @@ def list_old_page_2(conn):
         sql_num = 0
 
     div = '<ul>'
-    
+
     curs.execute(db_change('' + \
         'select title, date from history h ' + \
         "where title not like 'user:%' and title not like 'category:%' and title not like 'file:%' and " + \
@@ -23,10 +23,10 @@ def list_old_page_2(conn):
     n_list = curs.fetchall()
     for data in n_list:
         div += '<li><a href="/w/' + url_pas(data[0]) + '">' + html.escape(data[0]) + '</a> (' + re.sub(' .*$', '', data[1]) + ')</li>'
-    
+
     div += '</ul>' + next_fix('/old_page?num=', num, n_list)
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('old_page'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['other', load_lang('return')]]

+ 6 - 6
route/list_please.py

@@ -8,17 +8,17 @@ def list_please_2(conn):
         sql_num = num * 50 - 50
     else:
         sql_num = 0
-        
+
     div = '<ul>'
-    
+
     curs.execute(db_change("select distinct title from back where type = 'no' order by title asc limit ?, 50"), [sql_num])
     data_list = curs.fetchall()
     for data in data_list:
-        div += '<li><a id="not_thing" href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'   
-        
+        div += '<li><a id="not_thing" href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'
+
     div += '</ul>' + next_fix('/please?num=', num, data_list)
-    
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('need_document'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['other', load_lang('return')]]

+ 5 - 5
route/list_title_index.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def list_title_index_2(conn):
     curs = conn.cursor()
-    
+
     page = int(number_check(flask.request.args.get('page', '1')))
     num = int(number_check(flask.request.args.get('num', '100')))
     if page * num > 0:
@@ -23,7 +23,7 @@ def list_title_index_2(conn):
         data += '<hr class=\"main_hr\"><ul>'
 
     for list_data in title_list:
-        data += '<li>' + str(all_list) + '. <a href="/w/' + url_pas(list_data[0]) + '">' + list_data[0] + '</a></li>'        
+        data += '<li>' + str(all_list) + '. <a href="/w/' + url_pas(list_data[0]) + '">' + list_data[0] + '</a></li>'
         all_list += 1
 
     if page == 1:
@@ -48,7 +48,7 @@ def list_title_index_2(conn):
                     count_end += [0]
 
             count_end += [count_end[0] - count_end[1]  - count_end[2]  - count_end[3]]
-        
+
             data += '''
                 </ul>
                 <hr class=\"main_hr\">
@@ -72,8 +72,8 @@ def list_title_index_2(conn):
 
     data += '</ul>' + next_fix('/title_index?num=' + str(num) + '&page=', page, title_list, num)
     sub = ' (' + str(num) + ')'
-    
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('all_document_list'), wiki_set(), custom(), other2([sub, 0])],
         data = data,
         menu = [['other', load_lang('return')]]

+ 5 - 5
route/list_user.py

@@ -8,11 +8,11 @@ def list_user_2(conn):
         sql_num = num * 50 - 50
     else:
         sql_num = 0
-        
+
     list_data = '<ul>'
 
     admin_one = admin_check(1)
-    
+
     curs.execute(db_change("select id, date from user order by date desc limit ?, 50"), [sql_num])
     user_list = curs.fetchall()
     for data in user_list:
@@ -24,9 +24,9 @@ def list_user_2(conn):
                 ban_button = ' <a href="/ban/' + url_pas(data[0]) + '">(' + load_lang('ban') + ')</a>'
         else:
             ban_button = ''
-            
+
         list_data += '<li>' + ip_pas(data[0]) + ban_button
-        
+
         if data[1] != '':
             list_data += ' (' + data[1] + ')'
 
@@ -39,7 +39,7 @@ def list_user_2(conn):
 
     list_data += next_fix('/user_log?num=', num, user_list)
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('member_list'), wiki_set(), custom(), other2([0, 0])],
         data = list_data,
         menu = [['other', load_lang('return')]]

+ 9 - 9
route/list_user_topic.py

@@ -8,7 +8,7 @@ def list_user_topic_2(conn, name):
         sql_num = num * 50 - 50
     else:
         sql_num = 0
-    
+
     one_admin = admin_check(1)
 
     div =   '''
@@ -20,13 +20,13 @@ def list_user_topic_2(conn, name):
                         <td id="main_table_width">''' + load_lang('time') + '''</td>
                     </tr>
             '''
-    
+
     curs.execute(db_change("select title, id, sub, ip, date from topic where ip = ? order by date desc limit ?, 50"), [name, sql_num])
     data_list = curs.fetchall()
     for data in data_list:
         title = html.escape(data[0])
         sub = html.escape(data[2])
-        
+
         if one_admin == 1:
             curs.execute(db_change("select * from ban where block = ?"), [data[3]])
             if curs.fetchall():
@@ -35,21 +35,21 @@ def list_user_topic_2(conn, name):
                 ban = ' <a href="/ban/' + url_pas(data[3]) + '">(' + load_lang('ban') + ')</a>'
         else:
             ban = ''
-            
+
         curs.execute(db_change("select code from topic where id = '1' and title = ? and sub = ?"), [title, sub])
         div += '<tr><td><a href="/thread/' + url_pas(curs.fetchall()[0][0]) + '#' + data[1] + '">' + title + '#' + data[1] + '</a> (' + sub + ')</td>'
         div += '<td>' + ip_pas(data[3]) + ban + '</td><td>' + data[4] + '</td></tr>'
 
     div += '</tbody></table>'
-    div += next_fix('/topic_record/' + url_pas(name) + '?num=', num, data_list)      
-    
+    div += next_fix('/topic_record/' + url_pas(name) + '?num=', num, data_list)
+
     curs.execute(db_change("select end from ban where block = ?"), [name])
     if curs.fetchall():
         sub = ' (' + load_lang('blocked') + ')'
     else:
-        sub = 0 
-    
-    return easy_minify(flask.render_template(skin_check(), 
+        sub = 0
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('discussion_record'), wiki_set(), custom(), other2([sub, 0])],
         data = div,
         menu = [['other', load_lang('other')], ['user', load_lang('user')], ['count/' + url_pas(name), load_lang('count')], ['record/' + url_pas(name), load_lang('record')]]

+ 14 - 14
route/login.py

@@ -6,16 +6,16 @@ def login_2(conn):
     ip = ip_check()
     if ip_or_user(ip) == 0:
         return redirect('/user')
-    
+
     if ban_check(tool = 'login') == 1:
         return re_error('/ban')
-        
-    if flask.request.method == 'POST':        
+
+    if flask.request.method == 'POST':
         if captcha_post(flask.request.form.get('g-recaptcha-response', '')) == 1:
             return re_error('/error/13')
         else:
             captcha_post('', 0)
-            
+
         agent = flask.request.headers.get('User-Agent')
 
         curs.execute(db_change("select pw, encode from user where id = ?"), [flask.request.form.get('id', None)])
@@ -24,7 +24,7 @@ def login_2(conn):
             return re_error('/error/2')
 
         pw_check_d = pw_check(
-            flask.request.form.get('pw', ''), 
+            flask.request.form.get('pw', ''),
             user[0][0],
             user[0][1],
             flask.request.form.get('id', None)
@@ -34,7 +34,7 @@ def login_2(conn):
 
         flask.session['state'] = 1
         flask.session['id'] = flask.request.form.get('id', None)
-        
+
         curs.execute(db_change("select css from custom where user = ?"), [flask.request.form.get('id', None)])
         css_data = curs.fetchall()
         if css_data:
@@ -45,8 +45,8 @@ def login_2(conn):
         curs.execute(db_change("insert into ua_d (name, ip, ua, today, sub) values (?, ?, ?, ?, '')"), [flask.request.form.get('id', None), ip_check(1), agent, get_time()])
 
         conn.commit()
-        
-        return redirect('/user')  
+
+        return redirect('/user')
     else:
         oauth_check = 0
         oauth_content = '<hr class=\"main_hr\"><div class="oauth-wrapper"><ul class="oauth-list">'
@@ -64,22 +64,22 @@ def login_2(conn):
                         </a>
                     </li>
                 '''.format(
-                    oauth_supported[i], 
-                    oauth_supported[i], 
-                    oauth_supported[i], 
+                    oauth_supported[i],
+                    oauth_supported[i],
+                    oauth_supported[i],
                     load_lang('oauth_signin_' + oauth_supported[i])
                 )
 
                 oauth_check = 1
-        
+
         oauth_content += '</ul></div>'
 
         if oauth_check == 0:
             oauth_content = ''
 
         http_warring = '<hr class=\"main_hr\"><span>' + load_lang('http_warring') + '</span>'
-        
-        return easy_minify(flask.render_template(skin_check(),    
+
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('login'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
                     <form method="post">

+ 22 - 22
route/login_check_key.py

@@ -24,7 +24,7 @@ def login_check_key_2(conn, tool):
                 else:
                     b_text = ''
 
-                return easy_minify(flask.render_template(skin_check(),    
+                return easy_minify(flask.render_template(skin_check(),
                     imp = [load_lang('reset_user_ok'), wiki_set(), custom(), other2([0, 0])],
                     data = b_text + load_lang('id') + ' : ' + d_id + '<br>' + load_lang('password') + ' : ' + pw,
                     menu = [['user', load_lang('return')]]
@@ -33,56 +33,56 @@ def login_check_key_2(conn, tool):
                 return redirect('/pass_find')
         else:
             ip = ip_check()
-            
+
             if 'c_id' in flask.session and flask.session['c_key'] == flask.request.form.get('key', None):
                 curs.execute(db_change('select data from other where name = "encode"'))
                 db_data = curs.fetchall()
-                
+
                 if tool == 'check_key':
                     curs.execute(db_change("select id from user limit 1"))
                     if not curs.fetchall():
                         curs.execute(db_change("insert into user (id, pw, acl, date, encode) values (?, ?, 'owner', ?, ?)"), [
-                            flask.session['c_id'], 
-                            flask.session['c_pw'], 
-                            get_time(), 
+                            flask.session['c_id'],
+                            flask.session['c_pw'],
+                            get_time(),
                             db_data[0][0]
                         ])
-    
+
                         first = 1
                     else:
                         curs.execute(db_change("insert into user (id, pw, acl, date, encode) values (?, ?, 'user', ?, ?)"), [
-                            flask.session['c_id'], 
-                            flask.session['c_pw'], 
-                            get_time(), 
+                            flask.session['c_id'],
+                            flask.session['c_pw'],
+                            get_time(),
                             db_data[0][0]
                         ])
-    
+
                         first = 0
-    
+
                     agent = flask.request.headers.get('User-Agent')
-    
+
                     curs.execute(db_change("insert into user_set (name, id, data) values ('email', ?, ?)"), [
-                        flask.session['c_id'], 
+                        flask.session['c_id'],
                         flask.session['c_email']
                     ])
                     curs.execute(db_change("insert into ua_d (name, ip, ua, today, sub) values (?, ?, ?, ?, '')"), [
-                        flask.session['c_id'], 
-                        ip, 
-                        agent, 
+                        flask.session['c_id'],
+                        ip,
+                        agent,
                         get_time()
                     ])
-    
+
                     flask.session['state'] = 1
                     flask.session['id'] = flask.session['c_id']
                     flask.session['head'] = ''
-                            
+
                     conn.commit()
                 else:
                     curs.execute(db_change('delete from user_set where name = "email" and id = ?'), [ip])
                     curs.execute(db_change('insert into user_set (name, id, data) values ("email", ?, ?)'), [ip, flask.session['c_email']])
-                    
+
                     first = 0
-                          
+
                 flask.session.pop('c_id', None)
                 flask.session.pop('c_pw', None)
                 flask.session.pop('c_key', None)
@@ -107,7 +107,7 @@ def login_check_key_2(conn, tool):
         else:
             b_text = ''
 
-        return easy_minify(flask.render_template(skin_check(),    
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('check_key'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
                 <form method="post">

+ 7 - 7
route/login_need_email.py

@@ -28,7 +28,7 @@ def login_need_email_2(conn, tool):
                     i_text = 'Key : ' + flask.session['c_key']
 
                 send_email(flask.request.form.get('email', ''), t_text, i_text)
-                
+
                 return redirect('/check_pass_key')
             else:
                 return re_error('/error/12')
@@ -37,7 +37,7 @@ def login_need_email_2(conn, tool):
                 flask.session['c_key'] = ''.join(random.choice("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") for i in range(16))
                 flask.session['c_id'] = ip_check()
                 flask.session['c_pw'] = ''
-            
+
             if 'c_id' in flask.session:
                 main_email = ['naver.com', 'gmail.com', 'daum.net', 'kakao.com']
                 data = re.search('@([^@]+)$', flask.request.form.get('email', ''))
@@ -51,7 +51,7 @@ def login_need_email_2(conn, tool):
                             flask.session.pop('c_id', None)
                             flask.session.pop('c_pw', None)
                             flask.session.pop('c_key', None)
-                            
+
                             # user 대신 오류 화면 보여주게 수정 필요
                             return redirect('/user')
                         else:
@@ -71,14 +71,14 @@ def login_need_email_2(conn, tool):
 
                             send_email(flask.request.form.get('email', ''), t_text, i_text)
                             flask.session['c_email'] = flask.request.form.get('email', '')
-                  
+
                             if tool == 'email_change':
                                 return redirect('/email_replace')
                             else:
                                 return redirect('/check_key')
                     else:
                         return redirect('/email_filter')
-            
+
             return redirect('/user')
     else:
         if tool == 'pass_find':
@@ -89,7 +89,7 @@ def login_need_email_2(conn, tool):
             else:
                 b_text = ''
 
-            return easy_minify(flask.render_template(skin_check(),    
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('password_search'), wiki_set(), custom(), other2([0, 0])],
                 data =  b_text + '''
                         <form method="post">
@@ -110,7 +110,7 @@ def login_need_email_2(conn, tool):
             else:
                 b_text = ''
 
-            return easy_minify(flask.render_template(skin_check(),    
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('email'), wiki_set(), custom(), other2([0, 0])],
                 data =  '''
                         <a href="/email_filter">(''' + load_lang('email_filter_list') + ''')</a>

+ 30 - 30
route/login_oauth.py

@@ -32,15 +32,15 @@ def login_oauth_2(conn, platform, func):
 
     if func == 'init':
         if oauth_data['client_id'] == '' or oauth_data['client_secret'] == '':
-            return easy_minify(flask.render_template(skin_check(), 
-                imp = [load_lang('error'), wiki_set(), custom(), other2([0, 0])], 
-                data = load_lang('oauth_disabled'), 
+            return easy_minify(flask.render_template(skin_check(),
+                imp = [load_lang('error'), wiki_set(), custom(), other2([0, 0])],
+                data = load_lang('oauth_disabled'),
                 menu = [['user', load_lang('return')]]
             ))
         elif publish_url == 'https://':
-            return easy_minify(flask.render_template(skin_check(), 
-                imp = [load_lang('error'), wiki_set(), custom(), other2([0, 0])], 
-                data = load_lang('oauth_setting_not_found'), 
+            return easy_minify(flask.render_template(skin_check(),
+                imp = [load_lang('error'), wiki_set(), custom(), other2([0, 0])],
+                data = load_lang('oauth_setting_not_found'),
                 menu = [['user', load_lang('return')]]
             ))
 
@@ -58,24 +58,24 @@ def login_oauth_2(conn, platform, func):
 
         if platform == 'discord':
             return redirect(api_url['redirect'] + '?client_id={}&redirect_uri={}&response_type=code&scope=identify'.format(
-                data['client_id'], 
+                data['client_id'],
                 data['redirect_uri']
             ))
         elif platform == 'naver':
             return redirect(api_url['redirect'] + '?response_type=code&client_id={}&redirect_uri={}&state={}'.format(
-                data['client_id'], 
-                data['redirect_uri'], 
+                data['client_id'],
+                data['redirect_uri'],
                 data['state']
             ))
         elif platform == 'facebook':
             return redirect(api_url['redirect'] + '?client_id={}&redirect_uri={}&state={}'.format(
-                data['client_id'], 
-                data['redirect_uri'], 
+                data['client_id'],
+                data['redirect_uri'],
                 data['state']
             ))
         elif platform == 'kakao':
             return redirect(api_url['redirect'] + '?client_id={}&redirect_uri={}&response_type=code'.format(
-                data['client_id'], 
+                data['client_id'],
                 data['redirect_uri']
             ))
 
@@ -122,15 +122,15 @@ def login_oauth_2(conn, platform, func):
             profile_result =  urllib.request.urlopen(profile_exchange).read().decode('utf-8')
             profile_result_json = json.loads(profile_result)
             stand_json = {
-                'id'        : profile_result_json['id'], 
+                'id'        : profile_result_json['id'],
                 'name'      : profile_result_json['username'] + '#' + profile_result_json['discriminator'],
                 'picture'   : profile_result_json['avatar']
             }
         elif platform == 'naver':
             token_access = api_url['token'] + '?grant_type=authorization_code&client_id={}&client_secret={}&code={}&state={}'.format(
-                data['client_id'], 
-                data['client_secret'], 
-                code, 
+                data['client_id'],
+                data['client_secret'],
+                code,
                 state
             )
             token_result = urllib.request.urlopen(token_access).read().decode('utf-8')
@@ -151,9 +151,9 @@ def login_oauth_2(conn, platform, func):
             }
         elif platform == 'facebook':
             token_access = api_url['token'] + '?client_id={}&redirect_uri={}&client_secret={}&code={}'.format(
-                data['client_id'], 
-                data['redirect_uri'], 
-                data['client_secret'], 
+                data['client_id'],
+                data['redirect_uri'],
+                data['client_secret'],
                 code
             )
             token_result = urllib.request.urlopen(token_access).read().decode('utf-8')
@@ -164,8 +164,8 @@ def login_oauth_2(conn, platform, func):
             profile_result_json = json.loads(profile_result)
 
             stand_json = {
-                'id': profile_result_json['id'], 
-                'name': profile_result_json['name'], 
+                'id': profile_result_json['id'],
+                'name': profile_result_json['name'],
                 'picture': profile_result_json['picture']['data']['url']
             }
         elif platform == 'kakao':
@@ -199,26 +199,26 @@ def login_oauth_2(conn, platform, func):
             profile_result =  urllib.request.urlopen(profile_exchange).read().decode('utf-8')
             profile_result_json = json.loads(profile_result)
             stand_json = {
-                'id'        : profile_result_json['id'], 
+                'id'        : profile_result_json['id'],
                 'name'      : profile_result_json['properties']['nickname'],
                 'picture'   : profile_result_json['properties']['profile_image']
             }
-        
+
         if flask.session['referrer'][0:6] == 'change':
             curs.execute(db_change('select * from oauth_conn where wiki_id = ? and provider = ?'), [flask.session['id'], platform])
             oauth_result = curs.fetchall()
             if len(oauth_result) == 0:
                 curs.execute(db_change('insert into oauth_conn (provider, wiki_id, sns_id, name, picture) values(?, ?, ?, ?, ?)'), [
-                    platform, 
-                    flask.session['id'], 
-                    stand_json['id'], 
-                    stand_json['name'], 
+                    platform,
+                    flask.session['id'],
+                    stand_json['id'],
+                    stand_json['name'],
                     stand_json['picture']
                 ])
             else:
                 curs.execute(db_change('update oauth_conn set name = ? picture = ? where wiki_id = ?'), [
-                    stand_json['name'], 
-                    stand_json['picture'], 
+                    stand_json['name'],
+                    stand_json['picture'],
                     flask.session['id']
                 ])
 
@@ -231,5 +231,5 @@ def login_oauth_2(conn, platform, func):
             else:
                 flask.session['state'] = 1
                 flask.session['id'] = curs_result[0][2]
-        
+
         return redirect(flask.session['refer'])

+ 5 - 5
route/login_pw_change.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def login_pw_change_2(conn):
     curs = conn.cursor()
-    
+
     if ban_check() == 1:
         return re_error('/ban')
 
@@ -19,9 +19,9 @@ def login_pw_change_2(conn):
             user = curs.fetchall()
             if not user:
                 return re_error('/error/2')
-               
+
             pw_check_d = pw_check(
-                flask.request.form.get('pw4', ''), 
+                flask.request.form.get('pw4', ''),
                 user[0][0],
                 user[0][1],
                 ip
@@ -30,12 +30,12 @@ def login_pw_change_2(conn):
                 return re_error('/error/10')
 
             hashed = pw_encode(flask.request.form.get('pw2', None))
-                
+
             curs.execute(db_change("update user set pw = ? where id = ?"), [hashed, ip])
 
             return redirect('/user')
     else:
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('password_change'), wiki_set(), custom(), other2([0, 0])],
             data = '''
                 <form method="post">

+ 11 - 11
route/login_register.py

@@ -15,8 +15,8 @@ def login_register_2(conn):
         set_d = curs.fetchall()
         if set_d and set_d[0][0] == 'on':
             return re_error('/ban')
-    
-    if flask.request.method == 'POST': 
+
+    if flask.request.method == 'POST':
         if captcha_post(flask.request.form.get('g-recaptcha-response', '')) == 1:
             return re_error('/error/13')
         else:
@@ -30,7 +30,7 @@ def login_register_2(conn):
 
         if re.search('(?:[^A-Za-zㄱ-힣0-9 ])', flask.request.form.get('id', None)):
             return re_error('/error/8')
-            
+
         curs.execute(db_change('select html from html_filter where kind = "name"'))
         set_d = curs.fetchall()
         for i in set_d:
@@ -46,7 +46,7 @@ def login_register_2(conn):
             return re_error('/error/6')
 
         hashed = pw_encode(flask.request.form.get('pw', None))
-        
+
         curs.execute(db_change('select data from other where name = "email_have"'))
         sql_data = curs.fetchall()
         if sql_data and sql_data[0][0] != '':
@@ -72,29 +72,29 @@ def login_register_2(conn):
             ip = ip_check()
             agent = flask.request.headers.get('User-Agent')
 
-            curs.execute(db_change("insert into ua_d (name, ip, ua, today, sub) values (?, ?, ?, ?, '')"), [flask.request.form.get('id', None), ip, agent, get_time()])  
+            curs.execute(db_change("insert into ua_d (name, ip, ua, today, sub) values (?, ?, ?, ?, '')"), [flask.request.form.get('id', None), ip, agent, get_time()])
 
             flask.session['state'] = 1
             flask.session['id'] = flask.request.form.get('id', None)
             flask.session['head'] = ''
-                  
+
             conn.commit()
-            
+
             if first == 0:
                 return redirect('/change')
             else:
                 return redirect('/setting')
-    else:        
+    else:
         contract = ''
-        
+
         curs.execute(db_change('select data from other where name = "contract"'))
         data = curs.fetchall()
         if data and data[0][0] != '':
             contract = data[0][0] + '<hr class=\"main_hr\">'
-        
+
         http_warring = '<hr class=\"main_hr\"><span>' + load_lang('http_warring') + '</span>'
 
-        return easy_minify(flask.render_template(skin_check(),    
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('register'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
                     <form method="post">

+ 1 - 1
route/main_file.py

@@ -5,7 +5,7 @@ def main_file_2(conn, data):
     curs = conn.cursor()
 
     if data == 'easter_egg.html':
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = ['easter_egg.html', wiki_set(), custom(), other2([0, 0])],
             data = open('./views/main_css/file/easter_egg.html', 'r').read(),
             menu = 0

+ 1 - 1
route/main_image_view.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def main_image_view_2(conn, name, app_var):
     curs = conn.cursor()
-    
+
     if os.path.exists(os.path.join(app_var['path_data_image'], name)):
         return flask.send_from_directory('./' + app_var['path_data_image'], name)
     else:

+ 16 - 16
route/main_manager.py

@@ -2,26 +2,26 @@ from .tool.func import *
 
 def main_manager_2(conn, num, r_ver):
     curs = conn.cursor()
-    
+
     title_list = {
-        0 : [load_lang('document_name'), 'acl'], 
-        1 : [0, 'check'], 
+        0 : [load_lang('document_name'), 'acl'],
+        1 : [0, 'check'],
         2 : [load_lang('file_name'), 'plus_file_filter'],
-        3 : [0, 'admin'], 
-        4 : [0, 'record'], 
-        5 : [0, 'topic_record'], 
-        6 : [load_lang('name'), 'admin_plus'], 
-        7 : [load_lang('name'), 'plus_edit_filter'], 
-        8 : [load_lang('document_name'), 'search'], 
-        9 : [0, 'block_user'], 
-        10 : [0, 'block_admin'], 
-        11 : [load_lang('document_name'), 'watch_list'], 
-        12 : [load_lang('compare_target'), 'check'], 
+        3 : [0, 'admin'],
+        4 : [0, 'record'],
+        5 : [0, 'topic_record'],
+        6 : [load_lang('name'), 'admin_plus'],
+        7 : [load_lang('name'), 'plus_edit_filter'],
+        8 : [load_lang('document_name'), 'search'],
+        9 : [0, 'block_user'],
+        10 : [0, 'block_admin'],
+        11 : [load_lang('document_name'), 'watch_list'],
+        12 : [load_lang('compare_target'), 'check'],
         13 : [load_lang('document_name'), 'edit']
     }
-    
+
     if num == 1:
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('admin_tool'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
                     <h2>''' + load_lang('admin') + '''</h2>
@@ -79,7 +79,7 @@ def main_manager_2(conn, num, r_ver):
             else:
                 placeholder = title_list[(num - 2)][0]
 
-            return easy_minify(flask.render_template(skin_check(), 
+            return easy_minify(flask.render_template(skin_check(),
                 imp = ['Redirect', wiki_set(), custom(), other2([0, 0])],
                 data =  '''
                         <form method="post">

+ 2 - 2
route/main_other.py

@@ -2,8 +2,8 @@ from .tool.func import *
 
 def main_other_2(conn):
     curs = conn.cursor()
-    
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('other_tool'), wiki_set(), custom(), other2([0, 0])],
         data = '''
             <h2>''' + load_lang('record') + '''</h2>

+ 1 - 1
route/main_skin_set.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def main_skin_set_2(conn):
     curs = conn.cursor()
-    
+
     data = flask.make_response(re_error('/error/5'))
 
     curs.execute(db_change("select data from other where name = 'language'"))

+ 1 - 1
route/main_views.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def main_views_2(conn, name):
     curs = conn.cursor()
-    
+
     if re.search('\/', name):
         m = re.search('^(.*)\/(.*)$', name)
         if m:

+ 30 - 29
route/recent_changes.py

@@ -9,7 +9,7 @@ def recent_changes_2(conn, name, tool):
             '?first=' + flask.request.form.get('b', '1') +
             '&second=' + flask.request.form.get('a', '1')
         )
-    else:        
+    else:
         ban = ''
         select = ''
         sub = ''
@@ -19,12 +19,12 @@ def recent_changes_2(conn, name, tool):
                 <tbody>
                     <tr>
         '''
-        
+
         num = int(number_check(flask.request.args.get('num', '1')))
         if num * 50 > 0:
             sql_num = num * 50 - 50
         else:
-            sql_num = 0   
+            sql_num = 0
 
         if name:
             if tool == 'history':
@@ -35,19 +35,19 @@ def recent_changes_2(conn, name, tool):
                     <td id="main_table_width">''' + load_lang('editor') + '''</td>
                     <td id="main_table_width">''' + load_lang('time') + '''</td>
                 '''
-                
+
                 tool_select = flask.request.args.get('tool', 'normal')
                 if tool_select == 'move':
                     plus_sql = 'where (send like ? or send like ?) and type = "" '
-                    plus_list = ['%(<a>' + name +'</a>%', '%<a>' + name + '</a> move)', sql_num]    
+                    plus_list = ['%(<a>' + name +'</a>%', '%<a>' + name + '</a> move)', sql_num]
                     sub += ' (' + load_lang('move') + ')'
                 elif tool_select == 'delete':
                     plus_sql = 'where (send like "%(delete)") and title = ? and type = "" '
-                    plus_list = [name, sql_num]    
-                    sub += ' (' + load_lang('revert') + ')'
+                    plus_list = [name, sql_num]
+                    sub += ' (' + load_lang('delete') + ')'
                 elif tool_select == 'revert':
                     plus_sql = 'where (send like ?) and title = ? and type = "" '
-                    plus_list = ['%(r%)', name, sql_num]    
+                    plus_list = ['%(r%)', name, sql_num]
                     sub += ' (' + load_lang('revert') + ')'
                 else:
                     plus_sql = 'where title = ? and type = "" '
@@ -67,7 +67,7 @@ def recent_changes_2(conn, name, tool):
                 '''
 
                 div = '<a href="/topic_record/' + url_pas(name) + '">(' + load_lang('discussion') + ')</a><hr class=\"main_hr\">' + div
-                
+
                 curs.execute(db_change('' + \
                     'select id, title, date, ip, send, leng from history ' + \
                     "where ip = ? and type = '' order by date desc limit ?, 50" + \
@@ -104,27 +104,27 @@ def recent_changes_2(conn, name, tool):
         div += '</tr>'
 
         data_list = curs.fetchall()
-        for data in data_list:    
-            select += '<option value="' + data[0] + '">' + data[0] + '</option>'     
+        for data in data_list:
+            select += '<option value="' + data[0] + '">' + data[0] + '</option>'
             send = '<br>'
-            
+
             if data[4]:
                 if not re.search("^(?: *)$", data[4]):
                     send = data[4]
-            
+
             if re.search("\+", data[5]):
                 leng = '<span style="color:green;">(' + data[5] + ')</span>'
             elif re.search("\-", data[5]):
                 leng = '<span style="color:red;">(' + data[5] + ')</span>'
             else:
                 leng = '<span style="color:gray;">(' + data[5] + ')</span>'
-                
+
             ip = ip_pas(data[3])
             if tool == 'history':
                 m_tool = '<a href="/history_tool/' + url_pas(data[1]) + '?num=' + data[0] + '&type=history">(' + load_lang('tool') + ')</a>'
             else:
                 m_tool = '<a href="/history_tool/' + url_pas(data[1]) + '?num=' + data[0] + '">(' + load_lang('tool') + ')</a>'
-            
+
             style = ['', '']
             date = data[2]
 
@@ -133,12 +133,12 @@ def recent_changes_2(conn, name, tool):
                 where title = ? and id = ? and hide = 'O'
             '''), [data[1], data[0]])
             hide = curs.fetchall()
-            
+
             if admin_check(6) == 1:
-                if hide:                    
+                if hide:
                     style[0] = 'id="toron_color_grey"'
                     style[1] = 'id="toron_color_grey"'
-                    
+
                     send += ' (' + load_lang('hide') + ')'
             elif not hide:
                 pass
@@ -179,7 +179,7 @@ def recent_changes_2(conn, name, tool):
 
         if name:
             if tool == 'history':
-                if not tool_select:
+                if tool_select == 'normal':
                     div = '' + \
                         '<a href="?tool=move">(' + load_lang('move') + ')</a> ' + \
                         '<a href="?tool=delete">(' + load_lang('delete') + ')</a> ' + \
@@ -187,17 +187,18 @@ def recent_changes_2(conn, name, tool):
                         '<hr class="main_hr">' + div + \
                     ''
 
+                    div = '''
+                        <form method="post">
+                            <select name="a">''' + select + '''</select> <select name="b">''' + select + '''</select>
+                            <button type="submit">''' + load_lang('compare') + '''</button>
+                        </form>
+                        <hr class=\"main_hr\">
+                    ''' + div
+
                     menu = [['w/' + url_pas(name), load_lang('document')], ['raw/' + url_pas(name), load_lang('raw')]]
                 else:
                     menu = [['history/' + url_pas(name), load_lang('return')]]
 
-                div = '''
-                    <form method="post">
-                        <select name="a">''' + select + '''</select> <select name="b">''' + select + '''</select>
-                        <button type="submit">''' + load_lang('compare') + '''</button>
-                    </form>
-                    <hr class=\"main_hr\">
-                ''' + div
                 title = name
                 div += next_fix('/history/' + url_pas(name) + '?tool=' + tool_select + '&num=', num, data_list)
             else:
@@ -215,11 +216,11 @@ def recent_changes_2(conn, name, tool):
             elif set_type == 'req':
                 sub = ' (' + load_lang('edit_req') + ')'
                 menu = [['recent_changes', load_lang('return')]]
-        
+
         if sub == '':
             sub = 0
-                
-        return easy_minify(flask.render_template(skin_check(), 
+
+        return easy_minify(flask.render_template(skin_check(),
             imp = [title, wiki_set(), custom(), other2([sub, 0])],
             data = div,
             menu = menu

+ 8 - 8
route/recent_discuss.py

@@ -4,14 +4,14 @@ def recent_discuss_2(conn):
     curs = conn.cursor()
 
     div = ''
-    
+
     if flask.request.args.get('what', 'normal') == 'normal':
         div += '<a href="/recent_discuss?what=close">(' + load_lang('close_discussion') + ')</a>'
-       
+
         m_sub = 0
     else:
         div += '<a href="/recent_discuss">(' + load_lang('open_discussion') + ')</a>'
-        
+
         m_sub = ' (' + load_lang('closed') + ')'
 
     div +=  '''
@@ -23,12 +23,12 @@ def recent_discuss_2(conn):
                         <td id="main_table_width_half">''' + load_lang('time') + '''</td>
                     </tr>
             '''
-    
+
     if m_sub == 0:
         curs.execute(db_change("select title, sub, date from rd where not stop = 'O' order by date desc limit 50"))
     else:
         curs.execute(db_change("select title, sub, date from rd where stop = 'O' order by date desc limit 50"))
-        
+
     for data in curs.fetchall():
         curs.execute(db_change("select code from topic where id = '1' and title = ? and sub = ?"), [data[0], data[1]])
         get_code = curs.fetchall()
@@ -41,10 +41,10 @@ def recent_discuss_2(conn):
         sub = html.escape(data[1])
 
         div += '<tr><td><a href="/thread/' + get_code + '">' + title + '</a> (' + sub + ')</td><td>' + data[2] + '</td></tr>'
-    
+
     div += '</tbody></table>'
-            
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('recent_discussion'), wiki_set(), custom(), other2([m_sub, 0])],
         data = div,
         menu = 0

+ 1 - 1
route/recent_history_delete.py

@@ -16,7 +16,7 @@ def recent_history_delete_2(conn, name):
 
         return redirect('/history/' + url_pas(name))
     else:
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2(['(r' + num + ')', 0])],
             data = '''
                 <form method="post">

+ 3 - 3
route/recent_history_tool.py

@@ -9,7 +9,7 @@ def recent_history_tool_2(conn, name):
         <h2>''' + load_lang('tool') + '''</h2>
         <ul>
             <li>
-                <a href="/raw/''' + url_pas(name) + '?num=' + num + '">' + load_lang('raw') + '''</a> 
+                <a href="/raw/''' + url_pas(name) + '?num=' + num + '">' + load_lang('raw') + '''</a>
             </li>
     '''
 
@@ -55,8 +55,8 @@ def recent_history_tool_2(conn, name):
     data += '''
         </ul>
     '''
-                
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [name, wiki_set(), custom(), other2(['(r' + num + ')', 0])],
         data = data,
         menu = [['history/' + url_pas(name), load_lang('return')]]

+ 8 - 8
route/search_deep.py

@@ -13,16 +13,16 @@ def search_deep_2(conn, name):
         sql_num = 0
 
     div = '<ul>'
-    
+
     div_plus = ''
     test = ''
-    
+
     curs.execute(db_change("select title from data where title = ?"), [name])
     if curs.fetchall():
         link_id = ''
     else:
         link_id = 'id="not_thing"'
-    
+
     div =   '''
             <ul>
                 <li>
@@ -44,26 +44,26 @@ def search_deep_2(conn, name):
         all_list = curs.fetchall()
         if all_list:
             test = all_list[0][1]
-            
+
             for data in all_list:
                 if data[1] != test:
                     div_plus += '</ul><hr class=\"main_hr\"><ul>'
-                    
+
                     test = data[1]
 
                 div_plus += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a> (' + data[1] + ')</li>'
     else:
-        curs.execute(db_change("select title from data where title like ? order by title limit ?, 50"), 
+        curs.execute(db_change("select title from data where title like ? order by title limit ?, 50"),
             ['%' + name + '%', sql_num]
         )
-        all_list = curs.fetchall()    
+        all_list = curs.fetchall()
         for data in all_list:
             div_plus += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a> (title)</li>'
 
     div += div_plus + '</ul>'
     div += next_fix('/search/' + url_pas(name) + '?num=', num, all_list)
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [name, wiki_set(), custom(), other2([' (' + load_lang('search') + ')', 0])],
         data = div,
         menu = 0

+ 2 - 2
route/server_now_update.py

@@ -43,13 +43,13 @@ def server_now_update_2(conn, r_ver):
             else:
                 print('Update error')
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('update'), wiki_set(), custom(), other2([0, 0])],
             data = load_lang("update_error") + ' <a href="https://github.com/2DU/opennamu">(Github)</a>',
             menu = [['manager/1', load_lang('return')]]
         ))
     else:
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('update'), wiki_set(), custom(), other2([0, 0])],
             data = load_lang('update_warring') + '''
                 <hr class=\"main_hr\">

+ 1 - 1
route/server_restart.py

@@ -14,7 +14,7 @@ def server_restart_2(conn):
 
         os.execl(sys.executable, sys.executable, *sys.argv)
     else:
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('wiki_restart'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
                     <form method="post">

+ 70 - 70
route/setting.py

@@ -17,61 +17,61 @@ def setting_2(conn, num):
             load_lang('main_bottom_body'),
             load_lang('main_acl_setting')
         ]
-        
+
         x = 0
         li_data = ''
-        
+
         for li in li_list:
             x += 1
             li_data += '<li><a href="/setting/' + str(x) + '">' + li + '</a></li>'
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('setting'), wiki_set(), custom(), other2([0, 0])],
             data = '<h2>' + load_lang('list') + '</h2><ul>' + li_data + '</ul>',
             menu = [['manager', load_lang('return')]]
         ))
     elif num == 1:
         i_list = {
-            0 : 'name', 
-            1 : 'logo', 
-            2 : 'frontpage', 
-            3 : 'license', 
-            4 : 'upload', 
-            5 : 'skin', 
-            7 : 'reg', 
-            8 : 'ip_view', 
-            9 : 'back_up', 
-            10 : 'port', 
-            11 : 'key', 
-            12 : 'update', 
-            13 : 'email_have', 
-            15 : 'encode', 
+            0 : 'name',
+            1 : 'logo',
+            2 : 'frontpage',
+            3 : 'license',
+            4 : 'upload',
+            5 : 'skin',
+            7 : 'reg',
+            8 : 'ip_view',
+            9 : 'back_up',
+            10 : 'port',
+            11 : 'key',
+            12 : 'update',
+            13 : 'email_have',
+            15 : 'encode',
             16 : 'host',
             19 : 'slow_edit'
         }
         n_list = {
-            0 : 'Wiki', 
-            1 : '', 
-            2 : 'FrontPage', 
-            3 : 'CC 0', 
-            4 : '2', 
-            5 : '',  
-            7 : '', 
-            8 : '', 
-            9 : '0', 
-            10 : '3000', 
-            11 : 'test', 
-            12 : 'stable', 
-            13 : '',  
-            15 : 'sha3', 
+            0 : 'Wiki',
+            1 : '',
+            2 : 'FrontPage',
+            3 : 'CC 0',
+            4 : '2',
+            5 : '',
+            7 : '',
+            8 : '',
+            9 : '0',
+            10 : '3000',
+            11 : 'test',
+            12 : 'stable',
+            13 : '',
+            15 : 'sha3',
             16 : '0.0.0.0',
             19 : '0'
         }
-        
+
         if flask.request.method == 'POST':
             for i in i_list:
                 curs.execute(db_change("update other set data = ? where name = ?"), [
-                    flask.request.form.get(i_list[i], n_list[i]), 
+                    flask.request.form.get(i_list[i], n_list[i]),
                     i_list[i]
                 ])
 
@@ -82,7 +82,7 @@ def setting_2(conn, num):
             return redirect('/setting/1')
         else:
             d_list = {}
-            
+
             for i in i_list:
                 curs.execute(db_change('select data from other where name = ?'), [i_list[i]])
                 sql_d = curs.fetchall()
@@ -90,11 +90,11 @@ def setting_2(conn, num):
                     d_list[i] = sql_d[0][0]
                 else:
                     curs.execute(db_change('insert into other (name, data) values (?, ?)'), [i_list[i], n_list[i]])
-                    
+
                     d_list[i] = n_list[i]
 
             conn.commit()
-            
+
             acl_div = ['']
             encode_data = ['sha256', 'sha3']
             for acl_data in encode_data:
@@ -123,7 +123,7 @@ def setting_2(conn, num):
                 branch_div += '<option value="master">master</option>'
                 branch_div += '<option value="stable">stable</option>'
 
-            return easy_minify(flask.render_template(skin_check(), 
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('main_setting'), wiki_set(), custom(), other2([0, 0])],
                 data = '''
                     <form method="post">
@@ -192,8 +192,8 @@ def setting_2(conn, num):
             ))
     elif num == 2:
         i_list = [
-            'contract', 
-            'no_login_warring', 
+            'contract',
+            'no_login_warring',
             'edit_bottom_text',
             'check_key_text',
             'email_title',
@@ -208,18 +208,18 @@ def setting_2(conn, num):
         if flask.request.method == 'POST':
             for i in i_list:
                 curs.execute(db_change("update other set data = ? where name = ?"), [
-                    flask.request.form.get(i, ''), 
+                    flask.request.form.get(i, ''),
                     i
                 ])
 
             conn.commit()
-            
+
             admin_check(None, 'edit_set')
 
             return redirect('/setting/2')
         else:
             d_list = []
-            
+
             for i in i_list:
                 curs.execute(db_change('select data from other where name = ?'), [i])
                 sql_d = curs.fetchall()
@@ -227,12 +227,12 @@ def setting_2(conn, num):
                     d_list += [sql_d[0][0]]
                 else:
                     curs.execute(db_change('insert into other (name, data) values (?, ?)'), [i, ''])
-                    
+
                     d_list += ['']
 
             conn.commit()
 
-            return easy_minify(flask.render_template(skin_check(), 
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('text_setting'), wiki_set(), custom(), other2([0, 0])],
                 data = '''
                     <form method="post">
@@ -306,7 +306,7 @@ def setting_2(conn, num):
                     coverage = ''
                 else:
                     coverage = flask.request.args.get('skin', '')
-                
+
             curs.execute(db_change("select name from other where name = ? and coverage = ?"), [info_d, coverage])
             if curs.fetchall():
                 curs.execute(db_change("update other set data = ? where name = ? and coverage = ?"), [
@@ -316,7 +316,7 @@ def setting_2(conn, num):
                 ])
             else:
                 curs.execute(db_change("insert into other (name, data, coverage) values (?, ?, ?)"), [info_d, flask.request.form.get('content', ''), coverage])
-            
+
             conn.commit()
 
             admin_check(None, 'edit_set')
@@ -352,7 +352,7 @@ def setting_2(conn, num):
                     <hr class=\"main_hr\">
                 '''
                 plus = ''
-                
+
             head = curs.fetchall()
             if head:
                 data = head[0][0]
@@ -364,7 +364,7 @@ def setting_2(conn, num):
             else:
                 sub_plus = ''
 
-            return easy_minify(flask.render_template(skin_check(), 
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang(data = 'main' + title, safe = 1), wiki_set(), custom(), other2([' (HTML)' + sub_plus, 0])],
                 data = '''
                     <form method="post">
@@ -384,13 +384,13 @@ def setting_2(conn, num):
                 curs.execute(db_change("update other set data = ? where name = 'robot'"), [flask.request.form.get('content', '')])
             else:
                 curs.execute(db_change("insert into other (name, data) values ('robot', ?)"), [flask.request.form.get('content', '')])
-            
+
             conn.commit()
-            
+
             fw = open('./robots.txt', 'w')
             fw.write(re.sub('\r\n', '\n', flask.request.form.get('content', '')))
             fw.close()
-            
+
             admin_check(None, 'edit_set')
 
             return redirect('/setting/5')
@@ -423,7 +423,7 @@ def setting_2(conn, num):
             if not data or data == '':
                 data = ''.join(lines)
 
-            return easy_minify(flask.render_template(skin_check(), 
+            return easy_minify(flask.render_template(skin_check(),
                 imp = ['robots.txt', wiki_set(), custom(), other2([0, 0])],
                 data = '''
                     <a href="/robots.txt">(''' + load_lang('view') + ''')</a>
@@ -438,9 +438,9 @@ def setting_2(conn, num):
             ))
     elif num == 6:
         i_list = [
-            'recaptcha', 
-            'sec_re', 
-            'g_email', 
+            'recaptcha',
+            'sec_re',
+            'g_email',
             'g_pass'
         ]
 
@@ -454,15 +454,15 @@ def setting_2(conn, num):
                 curs.execute(db_change("update other set data = ? where name = ?"), [into_data, data])
 
             conn.commit()
-            
+
             admin_check(None, 'edit_set')
 
             return redirect('/setting/6')
         else:
             d_list = []
-            
+
             x = 0
-            
+
             for i in i_list:
                 curs.execute(db_change('select data from other where name = ?'), [i])
                 sql_d = curs.fetchall()
@@ -470,14 +470,14 @@ def setting_2(conn, num):
                     d_list += [sql_d[0][0]]
                 else:
                     curs.execute(db_change('insert into other (name, data) values (?, ?)'), [i, ''])
-                    
+
                     d_list += ['']
 
                 x += 1
 
             conn.commit()
 
-            return easy_minify(flask.render_template(skin_check(), 
+            return easy_minify(flask.render_template(skin_check(),
                 imp = ['Google', wiki_set(), custom(), other2([0, 0])],
                 data = '''
                     <form method="post">
@@ -506,24 +506,24 @@ def setting_2(conn, num):
             ))
     elif num == 8:
         i_list = {
-            1 : 'edit', 
-            2 : 'discussion', 
+            1 : 'edit',
+            2 : 'discussion',
             3 : 'upload_acl',
             4 : 'all_view_acl',
             5 : 'edit_req_acl'
         }
         n_list = {
-            1 : 'normal', 
-            2 : 'normal', 
+            1 : 'normal',
+            2 : 'normal',
             3 : 'normal',
             4 : 'normal',
             5 : 'normal'
         }
-        
+
         if flask.request.method == 'POST':
             for i in i_list:
                 curs.execute(db_change("update other set data = ? where name = ?"), [
-                    flask.request.form.get(i_list[i], n_list[i]), 
+                    flask.request.form.get(i_list[i], n_list[i]),
                     i_list[i]
                 ])
 
@@ -534,7 +534,7 @@ def setting_2(conn, num):
             return redirect('/setting/8')
         else:
             d_list = {}
-            
+
             for i in i_list:
                 curs.execute(db_change('select data from other where name = ?'), [i_list[i]])
                 sql_d = curs.fetchall()
@@ -542,11 +542,11 @@ def setting_2(conn, num):
                     d_list[i] = sql_d[0][0]
                 else:
                     curs.execute(db_change('insert into other (name, data) values (?, ?)'), [i_list[i], n_list[i]])
-                    
+
                     d_list[i] = n_list[i]
 
             conn.commit()
-            
+
             acl_div = ['', '', '', '', '']
             acl_list = ['normal', 'user', 'admin', 'owner', '50_edit', 'email']
             for i in range(0, 5):
@@ -556,7 +556,7 @@ def setting_2(conn, num):
                     else:
                         acl_div[i] += '<option value="' + acl_data + '">' + acl_data + '</option>'
 
-            return easy_minify(flask.render_template(skin_check(), 
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('main_acl_setting'), wiki_set(), custom(), other2([0, 0])],
                 data = '''
                     <form method="post">

+ 5 - 5
route/setting_adsense.py

@@ -5,7 +5,7 @@ def setting_adsense_2(conn):
 
     if admin_check(None, 'adsense setting') != 1:
         return re_error('/error/3')
-    
+
     if flask.request.method == 'POST':
         try:
             adsense_enabled = flask.request.form.get('adsense_enabled')
@@ -16,15 +16,15 @@ def setting_adsense_2(conn):
                 data = '<h2>ie_no_data_required</h2>' + load_lang('ie_no_data_required'),
                 menu = [['other', load_lang('return')]]
             ))
-        
+
         if adsense_enabled == 'on':
             curs.execute(db_change('update other set data = "True" where name = "adsense"'))
         else:
             curs.execute(db_change('update other set data = "False" where name = "adsense"'))
-        
+
         curs.execute(db_change('update other set data = ? where name = "adsense_code"'), [adsense_code])
         conn.commit()
-        
+
         return redirect('/adsense_setting')
 
     body_content = ''
@@ -51,7 +51,7 @@ def setting_adsense_2(conn):
             <button type="submit" value="publish">{}</button>
         </form>
     '''
-    
+
     body_content += template.format(
         'checked' if adsense_enabled == 'True' else '',
         load_lang('adsense_enable'),

+ 11 - 11
route/setting_oauth.py

@@ -10,7 +10,7 @@ def setting_oauth_2(conn):
         try:
             facebook_client_id = flask.request.form['facebook_client_id']
             facebook_client_secret = flask.request.form['facebook_client_secret']
-            
+
             naver_client_id = flask.request.form['naver_client_id']
             naver_client_secret = flask.request.form['naver_client_secret']
         except:
@@ -42,7 +42,7 @@ def setting_oauth_2(conn):
                     }
                 }
             ''')
-        
+
         return flask.redirect('/oauth_setting')
 
     oauth_supported = load_oauth('_README')['support']
@@ -56,7 +56,7 @@ def setting_oauth_2(conn):
                     target_box.checked = true;
                 } else {
                     target_box.checked = false;
-                } 
+                }
             }
         </script>
     '''
@@ -81,18 +81,18 @@ def setting_oauth_2(conn):
             '''.format(
                 oauth_supported[i],
                 load_target,
-                oauth_supported[i], 
-                load_target, 
-                oauth_supported[i], 
-                load_target, 
-                oauth_supported[i], 
-                load_target, 
+                oauth_supported[i],
+                load_target,
+                oauth_supported[i],
+                load_target,
+                oauth_supported[i],
+                load_target,
                 oauth_data['client_{}'.format(load_target)]
             )
-    
+
     body_content += '<button id="save" type="submit">' + load_lang('save') + '</button></form>'
     body_content += '<script>' + init_js + '</script>'
-    
+
     return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('oauth_setting'), wiki_set(), custom(), other2([0, 0])],
         data = body_content,

+ 50 - 50
route/tool/func.py

@@ -124,14 +124,14 @@ def last_change(data):
 
                         if e_data == 0:
                             re_data_3 = re.compile("<" + i_data[0] + ">")
-                            data = re_data_3.sub("<" + i_data[0] + " class=\"" + json_data[j_data]["class"] + "\">", data)        
+                            data = re_data_3.sub("<" + i_data[0] + " class=\"" + json_data[j_data]["class"] + "\">", data)
                 else:
                     re_data = re.compile("<(?P<in>" + j_data + "(?: (?:(?!>).)*)?)>")
                     data = re_data.sub("<\g<in> class=\"" + json_data[j_data]["class"] + "\">", data)
 
     return data
 
-def easy_minify(data, tool = None):    
+def easy_minify(data, tool = None):
     return last_change(data)
 
 def render_set(title = '', data = '', num = 0, s_data = 0, include = None):
@@ -204,7 +204,7 @@ def pw_encode(data, data2 = '', type_d = ''):
             salt_data = bytes(data2, 'utf-8')
         else:
             salt_data = bcrypt.gensalt(11)
-            
+
         return bcrypt.hashpw(bytes(data, 'utf-8'), salt_data).decode()
 
 def pw_check(data, data2, type_d = 'no', id_d = ''):
@@ -218,7 +218,7 @@ def pw_check(data, data2, type_d = 'no', id_d = ''):
             set_data = type_d
     else:
         set_data = db_data[0][0]
-    
+
     while 1:
         if set_data in ['sha256', 'sha3']:
             data3 = pw_encode(data = data, type_d = set_data)
@@ -254,7 +254,7 @@ def captcha_post(re_data, num = 1):
                     data = urllib.request.urlopen('https://www.google.com/recaptcha/api/siteverify?secret=' + sec_re[0][0] + '&response=' + re_data)
                 except:
                     pass
-                    
+
                 if data and data.getcode() == 200:
                     json_data = json.loads(data.read().decode(data.headers.get_content_charset()))
                     if json_data['success'] == True:
@@ -330,7 +330,7 @@ def ip_or_user(data = ''):
 
 def edit_button():
     insert_list = []
-    
+
     curs.execute(db_change("select html, plus from html_filter where kind = 'edit_top'"))
     db_data = curs.fetchall()
     for get_data in db_data:
@@ -366,7 +366,7 @@ def skin_check(set_n = 0):
     if skin_exist and skin_exist[0][0] != '':
         if os.path.exists(os.path.abspath('./views/' + skin_exist[0][0] + '/index.html')) == 1:
             skin = skin_exist[0][0]
-    
+
     curs.execute(db_change('select data from user_set where name = "skin" and id = ?'), [ip_check()])
     skin_exist = curs.fetchall()
     if skin_exist and skin_exist[0][0] != '':
@@ -397,12 +397,12 @@ def other2(data):
 
     req_list = ''
     main_css_ver = 1
-    
+
     if not 'main_css_load' in flask.session or not 'main_css_ver' in flask.session or flask.session['main_css_ver'] != main_css_ver:
         for i_data in os.listdir(os.path.join("views", "main_css", "css")):
             file_date = str(int(os.path.getmtime(os.path.join("views", "main_css", "css", i_data))))
             req_list += '<link rel="stylesheet" href="/views/main_css/css/' + i_data + '?ver=' + file_date + '">'
-        
+
         for i_data in os.listdir(os.path.join("views", "main_css", "js")):
             file_date = str(int(os.path.getmtime(os.path.join("views", "main_css", "js", i_data))))
             req_list += '<script src="/views/main_css/js/' + i_data + '?ver=' + file_date + '"></script>'
@@ -461,7 +461,7 @@ def wiki_set(num = 1):
             data_list += [db_data[0][0]]
         else:
             data_list += [data_list[0]]
-            
+
         curs.execute(db_change("select data from other where name = 'head' and coverage = ?"), [skin_check(1)])
         db_data = curs.fetchall()
         if db_data and db_data[0][0] != '':
@@ -490,7 +490,7 @@ def wiki_set(num = 1):
         var_data = '2'
 
         curs.execute(db_change('select data from other where name = "upload"'))
-    
+
     db_data = curs.fetchall()
     if db_data and db_data[0][0] != '':
         return db_data[0][0]
@@ -524,7 +524,7 @@ def diff(seqm):
         data = re.search('((?:(?!\n).)*)\n', end)
         if data:
             data = data.groups()[0]
-            
+
             left += 1
             if re.search('<span style=\'(?:(?:(?!\').)+)\'>', data):
                 num += 1
@@ -543,9 +543,9 @@ def diff(seqm):
             end = re.sub('((?:(?!\n).)*)\n', '', end, 1)
         else:
             break
-            
+
     return sub
-           
+
 def admin_check(num = None, what = None, name = ''):
     if name == '':
         ip = ip_check()
@@ -595,13 +595,13 @@ def admin_check(num = None, what = None, name = ''):
                     num = None
                 else:
                     break
-                    
+
     return 0
 
 def ip_pas(raw_ip):
     hide = 0
 
-    if ip_or_user(raw_ip) != 0:    
+    if ip_or_user(raw_ip) != 0:
         curs.execute(db_change("select data from other where name = 'ip_view'"))
         data = curs.fetchall()
         if data and data[0][0] != '':
@@ -623,7 +623,7 @@ def ip_pas(raw_ip):
 
     if ban_check(raw_ip) == 1:
         ip = '<s>' + ip + '</s>'
-         
+
     if hide == 0:
         ip += ' <a href="/tool/' + url_pas(raw_ip) + '">(' + load_lang('tool') + ')</a>'
 
@@ -642,7 +642,7 @@ def custom():
     if ip_or_user(ip) == 0:
         user_icon = 1
         user_name = ip
-        
+
         curs.execute(db_change('select data from user_set where name = "email" and id = ?'), [ip])
         data = curs.fetchall()
         if data:
@@ -689,15 +689,15 @@ def custom():
         user_topic = '0'
 
     return [
-        '', 
-        '', 
-        user_icon, 
-        user_head, 
-        email, 
-        user_name, 
-        user_admin, 
-        str(ban_check()), 
-        user_notice, 
+        '',
+        '',
+        user_icon,
+        user_head,
+        email,
+        user_name,
+        user_admin,
+        str(ban_check()),
+        user_notice,
         user_acl_list,
         ip,
         user_topic
@@ -772,7 +772,7 @@ def slow_edit_check():
 
 def acl_check(name = 'test', tool = '', sub = 'test'):
     ip = ip_check()
-    
+
     if ban_check() == 1:
         return 1
 
@@ -795,7 +795,7 @@ def acl_check(name = 'test', tool = '', sub = 'test'):
 
                 if ip != acl_n[0] or re.search("(\.|:)", ip):
                     return 1
-            
+
             if ip == acl_n[0] and not re.search("(\.|:)", ip) and not re.search("(\.|:)", acl_n[0]):
                 return 0
             else:
@@ -830,11 +830,11 @@ def acl_check(name = 'test', tool = '', sub = 'test'):
             num = 3
         elif tool == 'upload':
             curs.execute(db_change("select data from other where name = 'upload_acl'"))
-            
+
             num = 5
         elif tool == 'edit_req':
             curs.execute(db_change("select data from other where name = 'edit_req_acl'"))
-            
+
             num = 5
         else:
             if i == 0:
@@ -860,7 +860,7 @@ def acl_check(name = 'test', tool = '', sub = 'test'):
             if acl_data[0][0] == '50_edit':
                 if ip_or_user(ip) == 1:
                     return 1
-                
+
                 if admin_check(num) != 1:
                     curs.execute(db_change("select count(title) from history where ip = ?"), [ip])
                     count = curs.fetchall()
@@ -875,7 +875,7 @@ def acl_check(name = 'test', tool = '', sub = 'test'):
             if acl_data[0][0] == 'email':
                 if ip_or_user(ip) == 1:
                     return 1
-                
+
                 if admin_check(num) != 1:
                     curs.execute(db_change("select data from user_set where id = ? and name = 'email'"), [ip])
                     email = curs.fetchall()
@@ -920,7 +920,7 @@ def ban_check(ip = None, tool = None):
                     return 1
             else:
                 return 1
-    
+
     curs.execute(db_change("select login from ban where ((end > ? and end like '2%') or end = '') and block = ? and band = 'O'"), [get_time(), band_it])
     band_d = curs.fetchall()
     if band_d:
@@ -957,11 +957,11 @@ def ban_insert(name, end, why, login, blocker, type_d = None):
     curs.execute(db_change("select block from ban where ((end > ? and end like '2%') or end = '') and block = ? and band = ?"), [get_time(), name, band])
     if curs.fetchall():
         curs.execute(db_change("insert into rb (block, end, today, blocker, why, band) values (?, ?, ?, ?, ?, ?)"), [
-            name, 
+            name,
             'release',
-            now_time, 
-            blocker, 
-            '', 
+            now_time,
+            blocker,
+            '',
             band
         ])
         curs.execute(db_change("delete from ban where block = ? and band = ?"), [name, band])
@@ -982,7 +982,7 @@ def ban_insert(name, end, why, login, blocker, type_d = None):
 
         curs.execute(db_change("insert into rb (block, end, today, blocker, why, band) values (?, ?, ?, ?, ?, ?)"), [name, r_time, now_time, blocker, why, band])
         curs.execute(db_change("insert into ban (block, end, why, band, login) values (?, ?, ?, ?, ?)"), [name, r_time, why, band, login])
-    
+
     conn.commit()
 
 def rd_plus(title, sub, date):
@@ -1033,7 +1033,7 @@ def leng_check(first, second):
         all_plus = '-' + str(first - second)
     else:
         all_plus = '0'
-        
+
     return all_plus
 
 def number_check(data):
@@ -1050,15 +1050,15 @@ def edit_filter_do(data):
             match = re.compile(data_list[0], re.I)
             if match.search(data):
                 ban_insert(
-                    ip_check(), 
-                    '0' if data_list[1] == 'X' else data_list[1], 
-                    'edit filter', 
-                    None, 
+                    ip_check(),
+                    '0' if data_list[1] == 'X' else data_list[1],
+                    'edit filter',
+                    None,
                     'tool:edit filter'
                 )
-                
+
                 return 1
-    
+
     return 0
 
 def redirect(data = '/'):
@@ -1066,14 +1066,14 @@ def redirect(data = '/'):
 
 def re_error(data):
     conn.commit()
-    
+
     if data == '/ban':
         if ban_check() == 1:
             end = '<div id="get_user_info"></div><script>load_user_info("' + ip_check() + '");</script>'
         else:
             end = load_lang('authority_error')
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('error'), wiki_set(1), custom(), other2([0, 0])],
             data = '<h2>' + load_lang('error') + '</h2>' + end,
             menu = 0
@@ -1134,13 +1134,13 @@ def re_error(data):
                 data = '???'
 
             if num == 5:
-                return easy_minify(flask.render_template(skin_check(), 
+                return easy_minify(flask.render_template(skin_check(),
                     imp = [load_lang('skin_set'), wiki_set(1), custom(), other2([0, 0])],
                     data = '<div id="main_skin_set"><h2>' + load_lang('error') + '</h2><ul><li>' + data + '</li></ul></div>',
                     menu = 0
                 ))
             else:
-                return easy_minify(flask.render_template(skin_check(), 
+                return easy_minify(flask.render_template(skin_check(),
                     imp = [load_lang('error'), wiki_set(1), custom(), other2([0, 0])],
                     data = '<h2>' + load_lang('error') + '</h2><ul><li>' + data + '</li></ul>',
                     menu = 0

+ 7 - 7
route/tool/mark.py

@@ -20,9 +20,9 @@ def load_conn2(data):
 def send_parser(data):
     if not re.search('^<br>$', data):
         data = html.escape(data)
-        
+
         javascript = re.compile('javascript:', re.I)
-        
+
         data = javascript.sub('', data)
 
         while 1:
@@ -33,9 +33,9 @@ def send_parser(data):
                 data = re.sub('&lt;a(?: (?:(?:(?!&gt;).)*))?&gt;(?P<in>(?:(?!&lt;).)*)&lt;\/a&gt;', '<a href="/w/' + urllib.parse.quote(re_data).replace('/','%2F') + '">' + re_data + '</a>', data, 1)
             else:
                 break
-        
+
     return data
-    
+
 def plusing(data):
     for data_in in data:
         curs.execute(db_change("select title from back where title = ? and link = ? and type = ?"), [data_in[1], data_in[0], data_in[2]])
@@ -55,7 +55,7 @@ def render_do(title, data, num, include):
         data = ['', '', []]
 
     if num == 1:
-        data_num = len(data[2]) 
+        data_num = len(data[2])
         data_in_num = int(data_num / multiprocessing.cpu_count())
         data_in = []
 
@@ -69,9 +69,9 @@ def render_do(title, data, num, include):
             thread_start = threading.Thread(target = plusing, args = [data_in_for])
             thread_start.start()
             thread_start.join()
-        
+
         conn.commit()
-        
+
     if num == 2:
         return [data[0], data[1]]
     else:

+ 2 - 2
route/tool/set_mark/markdown.py

@@ -6,9 +6,9 @@ import re
 
 def markdown(conn, data, title, main_num):
     curs = conn.cursor()
-    
+
     data = '<div id="render_contect">' + re.sub('\r\n', '<br>', html.escape(data)) + '</div>'
     plus_data = '<script>render_markdown();</script>'
     backlink = []
-    
+
     return [data, plus_data, backlink]

+ 147 - 147
route/tool/set_mark/namumark.py

@@ -21,7 +21,7 @@ def table_parser(data, cel_data, start_data, num = 0):
             div_style += 'width: ' + table_width.groups()[0] + ';'
 
         all_table += 'width: 100%;'
-    
+
     table_height = re.search("&lt;table ?height=((?:(?!&gt;).)*)&gt;", data)
     if table_height:
         if re.search('^[0-9]+$', table_height.groups()[0]):
@@ -30,14 +30,14 @@ def table_parser(data, cel_data, start_data, num = 0):
             all_table += 'height: ' + table_height.groups()[0] + ';'
 
     # width, height
-    
+
     table_align = re.search("&lt;table ?align=((?:(?!&gt;).)*)&gt;", data)
     if table_align:
         if table_align.groups()[0] == 'right':
             all_table += 'float: right;'
         elif table_align.groups()[0] == 'center':
             all_table += 'margin: auto;'
-            
+
     table_text_align = re.search("&lt;table ?textalign=((?:(?!&gt;).)*)&gt;", data)
     if table_text_align:
         num = 1
@@ -55,14 +55,14 @@ def table_parser(data, cel_data, start_data, num = 0):
             row_style += 'text-align: center;'
         else:
             row_style += 'text-align: left;'
-        
+
     # align
-    
+
     table_cel = re.search("&lt;-((?:(?!&gt;).)*)&gt;", data)
     if table_cel:
         cel = 'colspan="' + table_cel.groups()[0] + '"'
     else:
-        cel = 'colspan="' + str(round(len(start_data) / 2)) + '"'   
+        cel = 'colspan="' + str(round(len(start_data) / 2)) + '"'
 
     table_row = re.search("&lt;\|((?:(?!&gt;).)*)&gt;", data)
     if table_row:
@@ -79,11 +79,11 @@ def table_parser(data, cel_data, start_data, num = 0):
         row_style += 'color: ' + row_bgcolor.groups()[0] + ';'
 
     # row
-        
+
     table_border = re.search("&lt;table ?bordercolor=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if table_border:
         all_table += 'border: ' + table_border.groups()[0] + ' 2px solid;'
-        
+
     table_bgcolor = re.search("&lt;table ?bgcolor=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if table_bgcolor:
         all_table += 'background: ' + table_bgcolor.groups()[0] + ';'
@@ -93,7 +93,7 @@ def table_parser(data, cel_data, start_data, num = 0):
         all_table += 'color: ' + table_bgcolor.groups()[0] + ';'
 
     # all
-        
+
     bgcolor = re.search("&lt;(?:bgcolor=)?(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if bgcolor:
         cel_style += 'background: ' + bgcolor.groups()[0] + ';'
@@ -101,7 +101,7 @@ def table_parser(data, cel_data, start_data, num = 0):
     bgcolor = re.search("&lt;color=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if bgcolor:
         cel_style += 'color: ' + bgcolor.groups()[0] + ';'
-        
+
     cel_width = re.search("&lt;width=((?:(?!&gt;).)*)&gt;", data)
     if cel_width:
         if re.search('^[0-9]+$', cel_width.groups()[0]):
@@ -117,7 +117,7 @@ def table_parser(data, cel_data, start_data, num = 0):
             cel_style += 'height: ' + cel_height.groups()[0] + ';'
 
     # cel
-        
+
     text_right = re.search("&lt;\)&gt;", data)
     text_center = re.search("&lt;:&gt;", data)
     text_left = re.search("&lt;\(&gt;",  data)
@@ -138,7 +138,7 @@ def table_parser(data, cel_data, start_data, num = 0):
     text_class = re.search("&lt;table ?class=((?:(?!&gt;).)+)&gt;", data)
     if text_class:
         table_class += text_class.groups()[0]
-        
+
     div_style += '"'
     all_table += '"'
     cel_style += '"'
@@ -146,7 +146,7 @@ def table_parser(data, cel_data, start_data, num = 0):
     table_class += '"'
 
     return [all_table, row_style, cel_style, row, cel, table_class, num, div_style]
-    
+
 def table_start(data):
     while 1:
         table = re.search('\n((?:(?:(?:(?:\|\|)+(?:(?:(?!\|\|).(?:\n)*)*))+)\|\|(?:\n)?)+)', data)
@@ -159,34 +159,34 @@ def table_start(data):
 
                     return_table = table_parser(all_table[1], all_table[2], all_table[0])
                     number = return_table[6]
-                    
+
                     table = re.sub(
-                        '^((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*', 
+                        '^((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*',
                         '\n' + \
                             '<div class="table_safe" ' + return_table[7] + '>' + \
                                 '<table ' + return_table[5] + ' ' + return_table[0] + '>' + \
                                     '<tbody>' + \
                                         '<tr ' + return_table[1] + '>' + \
-                                            '<td ' + return_table[2] + ' ' + return_table[3] + ' ' + return_table[4] + '>', 
-                        table, 
+                                            '<td ' + return_table[2] + ' ' + return_table[3] + ' ' + return_table[4] + '>',
+                        table,
                         1
                     )
                 else:
                     break
-                    
+
             table = re.sub('\|\|\n?$', '</td></tr></tbody></table></div>', table)
 
             while 1:
                 row_table = re.search('\|\|\n((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*((?:(?!\|\||<\/td>).\n*)*)', table)
                 if row_table:
                     row_table = row_table.groups()
-                    
+
                     return_table = table_parser(row_table[1], row_table[2], row_table[0], number)
-                    
+
                     table = re.sub(
-                        '\|\|\n((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*', 
-                        '</td></tr><tr ' + return_table[1] + '><td ' + return_table[2] + ' ' + return_table[3] + ' ' + return_table[4] + '>', 
-                        table, 
+                        '\|\|\n((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*',
+                        '</td></tr><tr ' + return_table[1] + '><td ' + return_table[2] + ' ' + return_table[3] + ' ' + return_table[4] + '>',
+                        table,
                         1
                     )
                 else:
@@ -196,13 +196,13 @@ def table_start(data):
                 cel_table = re.search('((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*((?:(?:(?!\|\||<\/td>).)|\n)*\n*)', table)
                 if cel_table:
                     cel_table = cel_table.groups()
-                    
+
                     return_table = table_parser(cel_table[1], re.sub('\n', ' ', cel_table[2]), cel_table[0], number)
-                    
+
                     table = re.sub(
-                        '((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*', 
-                        '</td><td ' + return_table[2] + ' ' + return_table[3] + ' ' + return_table[4] + '>', 
-                        table, 
+                        '((?:\|\|)+)((?:&lt;(?:(?:(?!&gt;).)+)&gt;)*)\n*',
+                        '</td><td ' + return_table[2] + ' ' + return_table[3] + ' ' + return_table[4] + '>',
+                        table,
                         1
                     )
                 else:
@@ -211,7 +211,7 @@ def table_start(data):
             data = re.sub('\n((?:(?:(?:(?:\|\|)+(?:(?:(?!\|\|).(?:\n)*)*))+)\|\|(?:\n)?)+)', table, data, 1)
         else:
             break
-            
+
     return data
 
 def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
@@ -229,29 +229,29 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
         if not middle_data[1]:
             if middle_stack > 0:
                 middle_stack += 1
-                
+
                 data = re.sub('(?:{{{((?:(?! |{{{|}}}|&lt;).)*)(?P<in> ?)|(}}}))', '&#123;&#123;&#123;' + middle_data[0] + '\g<in>', data, 1)
             else:
                 if re.search('^(#|@|\+|\-)', middle_data[0]) and not re.search('^(#|@|\+|\-){2}|(#|@|\+|\-)\\\\', middle_data[0]):
-                    if re.search('^(#(?:[0-9a-f-A-F]{3}){1,2})', middle_data[0]):                            
+                    if re.search('^(#(?:[0-9a-f-A-F]{3}){1,2})', middle_data[0]):
                         middle_search = re.search('^(#(?:[0-9a-f-A-F]{3}){1,2})', middle_data[0])
                         middle_list += ['span']
-                        
+
                         data = middle_re.sub('<span style="color: ' + middle_search.groups()[0] + ';">', data, 1)
                     elif re.search('^(?:#(\w+))', middle_data[0]):
                         middle_search = re.search('^(?:#(\w+))', middle_data[0])
                         middle_list += ['span']
-                        
+
                         data = middle_re.sub('<span style="color: ' + middle_search.groups()[0] + ';">', data, 1)
                     elif re.search('^(?:@((?:[0-9a-f-A-F]{3}){1,2}))', middle_data[0]):
                         middle_search = re.search('^(?:@((?:[0-9a-f-A-F]{3}){1,2}))', middle_data[0])
                         middle_list += ['span']
-                            
+
                         data = middle_re.sub('<span style="background: #' + middle_search.groups()[0] + ';">', data, 1)
                     elif re.search('^(?:@(\w+))', middle_data[0]):
                         middle_search = re.search('^(?:@(\w+))', middle_data[0])
                         middle_list += ['span']
-                        
+
                         data = middle_re.sub('<span style="background: ' + middle_search.groups()[0] + ';">', data, 1)
                     elif re.search('^(\+|-)([1-5])', middle_data[0]):
                         middle_search = re.search('^(\+|-)([1-5])', middle_data[0])
@@ -262,7 +262,7 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
                             font_size = str(100 - int(middle_search[1]) * 10)
 
                         middle_list += ['span']
-                        
+
                         data = middle_re.sub('<span style="font-size: ' + font_size + '%;">', data, 1)
                     elif re.search('^#!wiki', middle_data[0]):
                         middle_data_2 = re.search('{{{#!wiki(?: style=(?:&quot;|&#x27;)((?:(?!&quot;|&#x27;).)*)(?:&quot;|&#x27;))?(?: *)\n?', data)
@@ -272,14 +272,14 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
                             middle_data_2 = ['']
 
                         middle_list += ['div_1']
-                        
+
                         data = re.sub(
                             '{{{#!wiki(?: style=(?:&quot;|&#x27;)((?:(?!&quot;|&#x27;).)*)(?:&quot;|&#x27;))?(?: *)\n?',
-                            '<div id="wiki_div" style="' + str(middle_data_2[0] if middle_data_2[0] else '') + '">', 
-                            data, 
+                            '<div id="wiki_div" style="' + str(middle_data_2[0] if middle_data_2[0] else '') + '">',
+                            data,
                             1
                         )
-                    elif re.search('^#!syntax', middle_data[0]):                                         
+                    elif re.search('^#!syntax', middle_data[0]):
                         middle_data_2 = re.search('{{{#!syntax ((?:(?!\n).)+)\n?', data)
                         if middle_data_2:
                             middle_data_2 = middle_data_2.groups()
@@ -292,16 +292,16 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
                             syntax_num = 1
 
                         middle_list += ['pre']
-                        
+
                         data = re.sub(
-                            '{{{#!syntax ?((?:(?!\n).)*)\n?', 
-                            '<pre id="syntax"><code class="' + middle_data_2[0] + '">', 
+                            '{{{#!syntax ?((?:(?!\n).)*)\n?',
+                            '<pre id="syntax"><code class="' + middle_data_2[0] + '">',
                             data,
                             1
                         )
                     elif re.search('^#!folding', middle_data[0]):
                         middle_list += ['2div']
-                        
+
                         folding_data = re.search('{{{#!folding ?((?:(?!\n).)*)\n?', data)
                         if folding_data:
                             folding_data = folding_data.groups()
@@ -310,7 +310,7 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
 
                         if folding_num == 0:
                             folding_num = 1
-                        
+
                         data = re.sub(
                             '{{{#!folding ?((?:(?!\n).)*)\n?', '' + \
                             '<div>' + \
@@ -321,17 +321,17 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
                                     '</a>' + \
                                 '</div_2>' + \
                                 '<div id="' + include_num + 'folding_' + str(fol_num) + '" style="display: none;">' + \
-                                    '<div id="wiki_div" style="">', 
-                            data, 
+                                    '<div id="wiki_div" style="">',
+                            data,
                             1
                         )
-                            
+
                         fol_num += 1
                     elif re.search('^#!html', middle_data[0]):
                         middle_list += ['span']
-                        
+
                         html_number += 1
-                    
+
                         data = middle_re.sub('<span id="' + include_num + 'render_contect_' + str(html_number) + '">', data, 1)
                     else:
                         middle_list += ['span']
@@ -339,11 +339,11 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
                         data = middle_re.sub('<span>', data, 1)
                 else:
                     middle_list += ['code']
-                    
+
                     middle_stack += 1
-                    
+
                     data = middle_re.sub('<code>' + middle_data[0].replace('\\', '\\\\'), data, 1)
-            
+
                 middle_number += 1
         else:
             if middle_list == []:
@@ -354,19 +354,19 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
 
                 if middle_stack > 0:
                     data = middle_re.sub('&#125;&#125;&#125;', data, 1)
-                else:                    
+                else:
                     if middle_number > 0:
                         middle_number -= 1
-                        
+
                     if middle_list[middle_number] == '2div':
                         data = middle_re.sub('</div_1></div_2></div_2>', data, 1)
                     elif middle_list[middle_number] == 'pre':
                         data = middle_re.sub('</code></pre>', data, 1)
                     else:
                         data = middle_re.sub('</' + middle_list[middle_number] + '>', data, 1)
-                    
+
                     del(middle_list[middle_number])
-        
+
     while 1:
         if middle_stack == 0:
             break
@@ -379,17 +379,17 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
 
                 if middle_stack > 0:
                     data += '&#125;&#125;&#125;'
-                else:                    
+                else:
                     if middle_number > 0:
                         middle_number -= 1
-                        
+
                     if middle_list[middle_number] == '2div':
                         data += '</div_1></div_2></div_2>'
                     elif middle_list[middle_number] == 'pre':
                         data += '</code></pre>'
                     else:
                         data += '</' + middle_list[middle_number] + '>'
-                    
+
                     del(middle_list[middle_number])
 
     num = 0
@@ -397,15 +397,15 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
         nowiki_data = re.search('<code>((?:(?:(?!<\/code>).)*\n*)*)<\/code>', data)
         if nowiki_data:
             nowiki_data = nowiki_data.groups()
-            
+
             num += 1
 
             end_data += [['nowiki_' + str(num), nowiki_data[0], 'code']]
 
             data = re.sub(
-                '<code>((?:(?:(?!<\/code>).)*\n*)*)<\/code>', 
-                '<span id="nowiki_' + str(num) + '"></span>', 
-                data, 
+                '<code>((?:(?:(?!<\/code>).)*\n*)*)<\/code>',
+                '<span id="nowiki_' + str(num) + '"></span>',
+                data,
                 1
             )
         else:
@@ -422,9 +422,9 @@ def middle_parser(data, fol_num, syntax_num, folding_num, include_num):
             end_data += [['syntax_' + str(num), syntax_data[1], 'normal']]
 
             data = re.sub(
-                '<code class="((?:(?!").)+)">((?:(?:(?:(?!<\/code>|<span id="syntax_)).)+\n*)+)<\/code>', 
-                '<code class="' + syntax_data[0] + '"><span id="syntax_' + str(num) + '"></span></code>', 
-                data, 
+                '<code class="((?:(?!").)+)">((?:(?:(?:(?!<\/code>|<span id="syntax_)).)+\n*)+)<\/code>',
+                '<code class="' + syntax_data[0] + '"><span id="syntax_' + str(num) + '"></span></code>',
+                data,
                 1
             )
         else:
@@ -443,9 +443,9 @@ def namumark(conn, data, title, main_num, include_num):
 
     backlink = []
     end_data = []
-    
+
     include_num = include_num + '_' if include_num else ''
-    
+
     data = re.sub('<math>(?P<in>(?:(?!<\/math>).)+)<\/math>', '[math(\g<in>)]', data)
 
     data = html.escape(data)
@@ -457,9 +457,9 @@ def namumark(conn, data, title, main_num, include_num):
         math = math_re.search(data)
         if math:
             math = math.groups()[0]
-            
+
             first += 1
-            
+
             data = math_re.sub('<span id="math_' + str(first) + '"></span>', data, 1)
 
             plus_data += '''
@@ -503,7 +503,7 @@ def namumark(conn, data, title, main_num, include_num):
         include = include_re.search(data)
         if include:
             include = include.groups()[0]
-    
+
             include_data = re.search('^((?:(?!,).)+)', include)
             if include_data:
                 include_data = include_data.groups()[0]
@@ -545,7 +545,7 @@ def namumark(conn, data, title, main_num, include_num):
 
     data = re.sub('\n##(((?!\n).)+)', '', data)
     data = re.sub('<div id="wiki_div" style="">\n', '<div id="wiki_div" style="">', data)
-           
+
     while 1:
         wiki_table_data = re.search('<div id="wiki_div" ((?:(?!>).)+)>((?:(?!<div id="wiki_div"|<\/div_1>).\n*)+)<\/div_1>', data)
         if wiki_table_data:
@@ -577,13 +577,13 @@ def namumark(conn, data, title, main_num, include_num):
     redirect = redirect_re.search(data)
     if redirect:
         redirect = redirect.groups()[0]
-        
+
         return_link = tool.link_fix(redirect)
         main_link = return_link[0]
         other_link = return_link[1]
-        
+
         backlink += [[title, main_link + other_link, 'redirect']]
-        
+
         data = redirect_re.sub(
             '\n' + \
                 '<ul>' + \
@@ -591,8 +591,8 @@ def namumark(conn, data, title, main_num, include_num):
                         '<a href="' + tool.url_pas(main_link) + other_link + '">' + main_link + other_link + '</a>' + \
                     '</li>' + \
                 '</ul>' + \
-            '\n', 
-            data, 
+            '\n',
+            data,
             1
         )
 
@@ -605,7 +605,7 @@ def namumark(conn, data, title, main_num, include_num):
         data = no_toc_re.sub('', data)
 
     data = '<div class="all_in_data" id="in_data_0">' + data
-        
+
     toc_full = 0
     toc_top_stack = 6
     toc_stack = [0, 0, 0, 0, 0, 0]
@@ -615,7 +615,7 @@ def namumark(conn, data, title, main_num, include_num):
         toc = re.search('\n(={1,6}) ?((?:(?!\n).)+) ?(?:={1,6})\n', data)
         if toc:
             toc = toc.groups()
-            
+
             toc_number = len(toc[0])
             edit_number += 1
 
@@ -625,8 +625,8 @@ def namumark(conn, data, title, main_num, include_num):
 
             if toc_top_stack > toc_number:
                 toc_top_stack = toc_number
-                    
-            toc_full = toc_number        
+
+            toc_full = toc_number
             toc_stack[toc_number - 1] += 1
             toc_number = str(toc_number)
             all_stack = ''
@@ -647,13 +647,13 @@ def namumark(conn, data, title, main_num, include_num):
             new_toc_data = re.sub(' +$', '', new_toc_data)
             if re.search('^# ?(?P<in>[^#]+) ?#$', new_toc_data):
                 fol_head = '+'
-                
+
                 new_toc_data = re.sub('^# ?(?P<in>[^#]+) ?#$', '\g<in>', new_toc_data)
             else:
                 fol_head = '-'
-            
+
             data = re.sub(
-                '\n(={1,6}) ?((?:(?!\n).)+) ?\n', 
+                '\n(={1,6}) ?((?:(?!\n).)+) ?\n',
                 '\n' + \
                 '</div>'
                 '<h' + toc_number + ' id="s-' + all_stack + '">' + \
@@ -668,14 +668,14 @@ def namumark(conn, data, title, main_num, include_num):
                 '</h' + toc_number + '>' + \
                 '<div class="all_in_data"' + (' style="display: none;"' if fol_head == '+' else '') + ' id="in_data_' + all_stack + '">' + \
                     '\n',
-                data, 
+                data,
                 1
             )
 
             toc_main_data = new_toc_data
             toc_main_data = re.sub('\[\*((?:(?! |\]).)*)(?: ((?:(?!(\[\*(?:(?:(?!\]).)+)\]|\])).)+))?\]', '', toc_main_data)
             toc_main_data = re.sub('<span id="math_[0-9]"><\/span>', '(Math)', toc_main_data)
-            
+
             toc_data += '' + \
                 '<span style="margin-left: ' + str((toc_full - toc_top_stack) * 10) + 'px;">' + \
                     '<a href="#s-' + all_stack + '">' + all_stack + '.</a> ' + toc_main_data + \
@@ -689,7 +689,7 @@ def namumark(conn, data, title, main_num, include_num):
     data = toc_re.sub(toc_data, data)
 
     data = tool.savemark(data)
-    
+
     data = re.sub("\[anchor\((?P<in>(?:(?!\)\]).)+)\)\]", '<span id="\g<in>"></span>', data, flags = re.I)
 
     ruby_all = re.findall("\[ruby\(((?:(?:(?!\)\]).)+))\)\]", data, flags = re.I)
@@ -730,10 +730,10 @@ def namumark(conn, data, title, main_num, include_num):
 
     now_time = tool.get_time()
     data = re.sub('\[date\]', now_time, data, flags = re.I)
-    
+
     time_data = re.search('^([0-9]{4}-[0-9]{2}-[0-9]{2})', now_time)
     time = time_data.groups()
-    
+
     age_re = re.compile('\[age\(([0-9]{4}-[0-9]{2}-[0-9]{2})\)\]', re.I)
     while 1:
         age_data = age_re.search(data)
@@ -742,9 +742,9 @@ def namumark(conn, data, title, main_num, include_num):
 
             old = datetime.datetime.strptime(time[0], '%Y-%m-%d')
             will = datetime.datetime.strptime(age, '%Y-%m-%d')
-            
+
             e_data = old - will
-            
+
             data = age_re.sub(str(int(e_data.days / 365)), data, 1)
         else:
             break
@@ -757,9 +757,9 @@ def namumark(conn, data, title, main_num, include_num):
 
             old = datetime.datetime.strptime(time[0], '%Y-%m-%d')
             will = datetime.datetime.strptime(dday, '%Y-%m-%d')
-            
+
             e_data = old - will
-            
+
             if re.search('^-', str(e_data.days)):
                 e_day = str(e_data.days)
             else:
@@ -776,7 +776,7 @@ def namumark(conn, data, title, main_num, include_num):
         video = video_re.search(data)
         if video:
             video = video.groups()
-            
+
             width = re.search(', ?width=((?:(?!,).)+)', video[1])
             if width:
                 video_width = width.groups()[0]
@@ -784,12 +784,12 @@ def namumark(conn, data, title, main_num, include_num):
                     video_width += 'px'
             else:
                 video_width = '560px'
-            
+
             height = re.search(', ?height=((?:(?!,).)+)', video[1])
             if height:
                 video_height = height.groups()[0]
                 if re.search('^[0-9]+$', video_height):
-                    video_height += 'px'                
+                    video_height += 'px'
             else:
                 video_height = '315px'
 
@@ -808,16 +808,16 @@ def namumark(conn, data, title, main_num, include_num):
 
                 video_code = re.sub('^https:\/\/www\.youtube\.com\/watch\?v=', '', video_code)
                 video_code = re.sub('^https:\/\/youtu\.be\/', '', video_code)
-                
+
                 video_src = 'https://www.youtube.com/embed/' + video_code
             elif kakaotv_re.search(video[0]):
                 video_code = re.sub('^https:\/\/tv\.kakao\.com\/channel\/9262\/cliplink\/', '', video_code)
                 video_code = re.sub('^http:\/\/tv\.kakao\.com\/v\/', '', video_code)
-                
+
                 video_src = 'https://tv.kakao.com/embed/player/cliplink/' + video_code +'?service=kakao_tv'
             else:
                 video_src = 'https://embed.nicovideo.jp/watch/' + video_code
-                
+
             data = video_re.sub('<iframe style="width: ' + video_width + '; height: ' + video_height + ';" src="' + video_src + video_start + '" allowfullscreen></iframe>', data, 1)
         else:
             break
@@ -826,11 +826,11 @@ def namumark(conn, data, title, main_num, include_num):
         block = re.search('(\n(?:&gt; ?(?:(?:(?!\n).)+)?\n)+)', data)
         if block:
             block = block.groups()[0]
-            
+
             block = re.sub('^\n&gt; ?', '', block)
             block = re.sub('\n&gt; ?', '\n', block)
             block = re.sub('\n$', '', block)
-            
+
             data = re.sub('(\n(?:&gt; ?(?:(?:(?!\n).)+)?\n)+)', '\n<blockquote>' + block + '</blockquote>\n', data, 1)
         else:
             break
@@ -873,9 +873,9 @@ def namumark(conn, data, title, main_num, include_num):
         indent = re.search('\n( +)', data)
         if indent:
             indent = len(indent.groups()[0])
-            
+
             margin = '<span style="margin-left: 20px;"></span>' * indent
-            
+
             data = re.sub('\n( +)', '\n' + margin, data, 1)
         else:
             break
@@ -888,11 +888,11 @@ def namumark(conn, data, title, main_num, include_num):
         link = re.search('\[\[((?:(?!\[\[|\]\]).)+)\]\]', data)
         if link:
             link = link.groups()[0]
-            
+
             link_split = re.search('((?:(?!\|).)+)(?:\|((?:(?!\|).)+))', link)
             if link_split:
                 link_split = link_split.groups()
-                
+
                 main_link = link_split[0]
                 see_link = link_split[1]
             else:
@@ -909,7 +909,7 @@ def namumark(conn, data, title, main_num, include_num):
                         file_style += 'width: ' + file_width + ';'
                     else:
                         file_style += 'width: ' + file_width + 'px;'
-                
+
                 file_height = re.search('height=((?:(?!&).)+)', see_link)
                 if file_height:
                     file_height = file_height.groups()[0]
@@ -936,7 +936,7 @@ def namumark(conn, data, title, main_num, include_num):
 
                 if re.search('^(?:out|외부):', main_link):
                     file_src = re.sub('^(?:out|외부):', '', main_link)
-            
+
                     file_alt = main_link
                     exist = 'Yes'
                 else:
@@ -957,45 +957,45 @@ def namumark(conn, data, title, main_num, include_num):
 
                     curs.execute(tool.db_change("select title from data where title = ?"), [file_alt])
                     exist = curs.fetchall()
-                
+
                 if exist:
                     data = re.sub(
-                        '\[\[((?:(?!\[\[|\]\]).)+)\]\]', 
+                        '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
                         '<span style="' + file_align + '">' + \
                             '<span style="' + file_color + '">' + \
                                 '<img style="' + file_style + '" alt="' + file_alt + '" src="' + file_src + '">' + \
                             '</span>' + \
-                        '</span>', 
-                        data, 
+                        '</span>',
+                        data,
                         1
                     )
                 else:
                     data = re.sub(
-                        '\[\[((?:(?!\[\[|\]\]).)+)\]\]', 
-                        '<a id="not_thing" href="/upload?name=' + tool.url_pas(file_name) + '">' + file_alt + '</a>', 
-                        data, 
+                        '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
+                        '<a id="not_thing" href="/upload?name=' + tool.url_pas(file_name) + '">' + file_alt + '</a>',
+                        data,
                         1
                     )
             elif category_re.search(main_link):
                 main_link = category_re.sub('category:', main_link)
-                
+
                 if re.search('#blur', main_link):
                     see_link = 'Hidden'
                     link_id = 'id="inside"'
-                    
+
                     main_link = re.sub('#blur', '', main_link)
                 else:
                     link_id = ''
 
                 backlink += [[title, main_link, 'cat']]
                 category += '<a ' + link_id + ' href="' + tool.url_pas(main_link) + '">' + category_re.sub('', see_link) + '</a> | '
-                
+
                 data = re.sub('\[\[((?:(?!\[\[|\]\]).)+)\]\]', '', data, 1)
             elif re.search('^wiki:', main_link):
                 data = re.sub(
-                    '\[\[((?:(?!\[\[|\]\]).)+)\]\]', 
-                    '<a id="inside" href="/' + tool.url_pas(re.sub('^wiki:', '', main_link)) + '">' + see_link + '</a>', 
-                    data, 
+                    '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
+                    '<a id="inside" href="/' + tool.url_pas(re.sub('^wiki:', '', main_link)) + '">' + see_link + '</a>',
+                    data,
                     1
                 )
             elif re.search('^inter:((?:(?!:).)+):', main_link):
@@ -1014,14 +1014,14 @@ def namumark(conn, data, title, main_num, include_num):
                         data = re.sub(
                             '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
                             '<a id="inside" href="' + inter[0][0] + inter_data[1] + '">' + inter_view + see_link + '</a>',
-                            data, 
+                            data,
                             1
                         )
                     else:
                         data = re.sub(
                             '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
-                            '<a id="inside" href="' + inter[0][0] + inter_data[1] + '">' + inter_view + inter_data[1] + '</a>', 
-                            data, 
+                            '<a id="inside" href="' + inter[0][0] + inter_data[1] + '">' + inter_view + inter_data[1] + '</a>',
+                            data,
                             1
                         )
                 else:
@@ -1047,7 +1047,7 @@ def namumark(conn, data, title, main_num, include_num):
                     main_link = re.sub('\.\.\/\/', '/', main_link)
                 elif re.search('^\.\.\/', main_link):
                     main_link = re.sub('^\.\.\/', re.sub('(?P<in>.+)\/.*$', '\g<in>', title), main_link)
-                
+
                 if not re.search('^\|', main_link):
                     if main_link != title:
                         if main_link != '':
@@ -1058,31 +1058,31 @@ def namumark(conn, data, title, main_num, include_num):
                                 backlink += [[title, main_link, 'no']]
                             else:
                                 link_id = ''
-                        
+
                             backlink += [[title, main_link, '']]
-                            
+
                             data = re.sub(
-                                '\[\[((?:(?!\[\[|\]\]).)+)\]\]', 
+                                '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
                                 '<a ' + link_id + ' ' + \
                                     'title="' + main_link + other_link + '" ' + \
                                     'href="/w/' + tool.url_pas(main_link) + other_link + '"' + \
-                                '>' + see_link + '</a>', 
-                                data, 
+                                '>' + see_link + '</a>',
+                                data,
                                 1
                             )
                         else:
                             data = re.sub(
-                                '\[\[((?:(?!\[\[|\]\]).)+)\]\]', 
-                                '<a title="' + other_link + '" href="' + other_link + '">' + see_link + '</a>', 
-                                data, 
+                                '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
+                                '<a title="' + other_link + '" href="' + other_link + '">' + see_link + '</a>',
+                                data,
                                 1
                             )
                     else:
                         if re.search('^#', other_link):
                             data = re.sub(
-                                '\[\[((?:(?!\[\[|\]\]).)+)\]\]', 
-                                '<a title="' + other_link + '" href="' + other_link + '">' + other_link + '</a>', 
-                                data, 
+                                '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
+                                '<a title="' + other_link + '" href="' + other_link + '">' + other_link + '</a>',
+                                data,
                                 1
                             )
                         else:
@@ -1094,15 +1094,15 @@ def namumark(conn, data, title, main_num, include_num):
 
     br_re = re.compile('\[br\]', re.I)
     data = br_re.sub('<br>', data)
-            
+
     footnote_number = 0
-    
+
     footnote_all = []
     footnote_dict = {}
     footnote_re = {}
-    
+
     footdata_all = '<hr><ul id="footnote_data">'
-    
+
     re_footnote = re.compile('(?:\[\*((?:(?! |\]).)*)(?: ((?:(?!(?:\[\*|\])).)+))?\]|(\[(?:각주|footnote)\]))')
     while 1:
         footnote = re_footnote.search(data)
@@ -1110,7 +1110,7 @@ def namumark(conn, data, title, main_num, include_num):
             footnote_data = footnote.groups()
             if footnote_data[2]:
                 footnote_all.sort()
-                
+
                 for footdata in footnote_all:
                     if footdata[2] == 0:
                         footdata_in = ''
@@ -1126,9 +1126,9 @@ def namumark(conn, data, title, main_num, include_num):
                             '</a> <span id="' + include_num + 'fn-' + str(footdata[0]) + '">' + footdata_in + '</span>' + \
                         '</li>' + \
                     ''
-                
+
                 data = re_footnote.sub(footdata_all + '</ul>', data, 1)
-                
+
                 footnote_all = []
                 footdata_all = '<hr><ul id="footnote_data">'
             else:
@@ -1168,7 +1168,7 @@ def namumark(conn, data, title, main_num, include_num):
                         footnote_re[footnote_name] += 1
 
                     footnote_all += [[footnote_number, footnote_name, footnote]]
-                    
+
                     data = re_footnote.sub('' + \
                         '<sup>' + \
                             '<a href="#' + include_num + 'fn-' + str(footnote_number) + '" ' + \
@@ -1215,7 +1215,7 @@ def namumark(conn, data, title, main_num, include_num):
         category = ''
 
     data += category
-    
+
     i = 0
     while 1:
         try:
@@ -1262,7 +1262,7 @@ def namumark(conn, data, title, main_num, include_num):
                     j += 1
 
             i += 1
-    
+
     data = re.sub('<\/td_1>', '</td>', data)
     data = re.sub('<\/ul>\n?', '</ul>', data)
     data = re.sub('<\/pre>\n?', '</pre>', data)
@@ -1277,7 +1277,7 @@ def namumark(conn, data, title, main_num, include_num):
     data = re.sub('<\/ul>\n<ul>', '</ul><ul>', data)
     data = re.sub('\n<\/ul>', '</ul>', data)
     data = re.sub('\n', '<br>', data)
-        
+
     plus_data = '<script>render_html("' + include_num + 'render_contect");</script>' + plus_data
 
     return [data, plus_data, backlink]

+ 8 - 8
route/tool/set_mark/tool.py

@@ -19,7 +19,7 @@ def db_change(data):
         data = data.replace('?', '%s')
 
     return data
-    
+
 def ip_check(d_type = 0):
     if d_type == 0:
         if flask.session and ('state' and 'id') in flask.session:
@@ -27,7 +27,7 @@ def ip_check(d_type = 0):
         else:
             try:
                 ip = flask.request.environ.get('HTTP_X_REAL_IP', flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr))
-                
+
                 if ip == '::1' or ip == '127.0.0.1':
                     ip = flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr)
             except:
@@ -35,14 +35,14 @@ def ip_check(d_type = 0):
     else:
         try:
             ip = flask.request.environ.get('HTTP_X_REAL_IP', flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr))
-            
+
             if ip == '::1' or ip == '127.0.0.1':
                 ip = flask.request.environ.get('HTTP_X_FORWARDED_FOR', flask.request.remote_addr)
         except:
             ip = '-'
-            
+
     return str(ip)
-    
+
 def link_fix(main_link):
     if re.search('^:', main_link):
         main_link = re.sub('^:', '', main_link)
@@ -60,18 +60,18 @@ def link_fix(main_link):
         other_link = ''
 
     main_link = re.sub('\\\\#', '%23', main_link)
-        
+
     return [main_link, other_link]
 
 def savemark(data):
     data = re.sub("\[date\(now\)\]", get_time(), data)
-    
+
     ip = ip_check()
     if not re.search("\.", ip):
         name = '[[user:' + ip + '|' + ip + ']]'
     else:
         name = ip
-        
+
     data = re.sub("\[name\]", name, data)
 
     return data

+ 18 - 18
route/topic.py

@@ -18,7 +18,7 @@ def topic_2(conn, topic_num):
     topic_exist = curs.fetchall()
     if not topic_exist and len(sub) > 256:
         return re_error('/error/11')
-    
+
     if flask.request.method == 'POST':
         if captcha_post(flask.request.form.get('g-recaptcha-response', '')) == 1:
             return re_error('/error/13')
@@ -27,10 +27,10 @@ def topic_2(conn, topic_num):
 
         ip = ip_check()
         today = get_time()
-        
+
         if ban == 1:
             return re_error('/ban')
-        
+
         curs.execute(db_change("select id from topic where title = ? and sub = ? order by id + 0 desc limit 1"), [name, sub])
         old_num = curs.fetchall()
         if old_num:
@@ -59,43 +59,43 @@ def topic_2(conn, topic_num):
 
             if y_check == 1:
                 curs.execute(db_change('insert into alarm (name, data, date) values (?, ?, ?)'), [
-                    match.groups()[0], 
-                    ip + ' | <a href="/thread/' + str(topic_num) + '#' + str(num) + '">' + name + ' | ' + sub + ' | #' + str(num) + '</a>', 
+                    match.groups()[0],
+                    ip + ' | <a href="/thread/' + str(topic_num) + '#' + str(num) + '">' + name + ' | ' + sub + ' | #' + str(num) + '</a>',
                     today
                 ])
-        
+
         cate_re = re.compile('\[\[((?:분류|category):(?:(?:(?!\]\]).)*))\]\]', re.I)
         data = cate_re.sub('[br]', flask.request.form.get('content', 'Test'))
-        
+
         for rd_data in re.findall("(?:#([0-9]+))", data):
             curs.execute(db_change("select ip from topic where title = ? and sub = ? and id = ?"), [name, sub, rd_data])
             ip_data = curs.fetchall()
             if ip_data and ip_or_user(ip_data[0][0]) == 0:
                 curs.execute(db_change('insert into alarm (name, data, date) values (?, ?, ?)'), [
-                    ip_data[0][0], 
-                    ip + ' | <a href="/thread/' + str(topic_num) + '#' + str(num) + '">' + name + ' | ' + sub + ' | #' + str(num) + '</a>', 
+                    ip_data[0][0],
+                    ip + ' | <a href="/thread/' + str(topic_num) + '#' + str(num) + '">' + name + ' | ' + sub + ' | #' + str(num) + '</a>',
                     today
                 ])
-            
+
         data = re.sub("(?P<in>#(?:[0-9]+))", '[[\g<in>]]', data)
         data = savemark(data)
 
         rd_plus(name, sub, today)
         curs.execute(db_change("insert into topic (id, title, sub, data, date, ip, block, top, code) values (?, ?, ?, ?, ?, ?, '', '', ?)"), [
-            str(num), 
-            name, 
-            sub, 
-            data, 
-            today, 
+            str(num),
+            name,
+            sub,
+            data,
+            today,
             ip,
             str(topic_num) if num == 1 else ''
         ])
         conn.commit()
-        
+
         return redirect('/thread/' + str(topic_num))
     else:
         data = ''
-    
+
         curs.execute(db_change("select stop from rd where title = ? and sub = ? and stop != ''"), [name, sub])
         close_data = curs.fetchall()
         if (close_data and admin != 1) or ban == 1:
@@ -123,7 +123,7 @@ def topic_2(conn, topic_num):
             <div id="see_preview"></div>
         '''
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [name, wiki_set(), custom(), other2([' (' + load_lang('discussion') + ')', 0])],
             data = '''
                 <h2 id="topic_top_title">''' + sub + '''</h2>

+ 2 - 2
route/topic_admin.py

@@ -33,7 +33,7 @@ def topic_admin_2(conn, topic_num, num):
 
         curs.execute(db_change("select end from ban where block = ?"), [data[0][1]])
         user_ban_d = curs.fetchall()
-        
+
         ban += '''
             <br>
             <h2>''' + load_lang('admin_tool') + '''</h2>
@@ -56,7 +56,7 @@ def topic_admin_2(conn, topic_num, num):
             </ul>
         '''
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('discussion_tool'), wiki_set(), custom(), other2([' (#' + str(num) + ')', 0])],
         data = ban,
         menu = [['thread/' + str(topic_num) + '#' + str(num), load_lang('return')]]

+ 3 - 3
route/topic_block.py

@@ -17,9 +17,9 @@ def topic_block_2(conn, topic_num, num):
             curs.execute(db_change("update topic set block = '' where title = ? and sub = ? and id = ?"), [name, sub, str(num)])
         else:
             curs.execute(db_change("update topic set block = 'O' where title = ? and sub = ? and id = ?"), [name, sub, str(num)])
-        
+
         rd_plus(name, sub, get_time())
-        
+
         conn.commit()
-        
+
     return redirect('/thread/' + str(topic_num) + '#' + str(num))

+ 14 - 14
route/topic_close_list.py

@@ -2,22 +2,22 @@ from .tool.func import *
 
 def topic_close_list_2(conn, name):
     curs = conn.cursor()
-    
+
     div = ''
     tool = flask.request.args.get('tool', '')
 
     plus = ''
     menu = [['topic/' + url_pas(name), load_lang('return')]]
-    
+
     if tool == 'close':
         curs.execute(db_change("select sub from rd where title = ? and stop = 'O' order by sub asc"), [name])
-        
+
         sub = load_lang('closed_discussion')
     elif tool == 'agree':
         curs.execute(db_change("select sub from rd where title = ? and agree = 'O' order by sub asc"), [name])
-        
+
         sub = load_lang('agreed_discussion')
-    else:        
+    else:
         sub = load_lang('discussion_list')
         menu = [['w/' + url_pas(name), load_lang('document')]]
 
@@ -32,7 +32,7 @@ def topic_close_list_2(conn, name):
             topic_num = str(int(t_data[0][0]) + 1)
         else:
             topic_num = '1'
-        
+
         plus = '''
             <a href="/topic/''' + url_pas(name) + '?tool=close">(' + load_lang('closed_discussion') + ')</a> <a href="/topic/' + url_pas(name) + '?tool=agree">(' + load_lang('agreed_discussion') + ''')</a>
             <hr class=\"main_hr\">
@@ -55,21 +55,21 @@ def topic_close_list_2(conn, name):
     t_num = 0
     for data in curs.fetchall():
         t_num += 1
-        
+
         curs.execute(db_change("select code from topic where title = ? and sub = ? and id = '1'"), [name, data[0]])
         first_topic = curs.fetchall()
-        if first_topic:                
+        if first_topic:
             it_p = 0
-            
+
             if tool == '':
                 curs.execute(db_change("select title from rd where title = ? and sub = ? and stop = 'O' order by sub asc"), [name, data[0]])
                 if curs.fetchall():
                     it_p = 1
-            
+
             if it_p != 1:
                 curs.execute(db_change("select id from topic where title = ? and sub = ? order by date desc limit 1"), [name, data[0]])
                 t_data = curs.fetchall()
-            
+
                 div += '''
                     <h2><a href="/thread/''' + first_topic[0][0] + '">' + str(t_num) + '. ' + data[0] + '''</a></h2>
                     <div id="topic_pre_''' + str(t_num) + '''"></div>
@@ -81,11 +81,11 @@ def topic_close_list_2(conn, name):
                         }
                     </script>
                 '''
-                
+
     if div == '':
         plus = re.sub('^<br>', '', plus)
-    
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [name, wiki_set(), custom(), other2([' (' + sub + ')', 0])],
         data = div + plus,
         menu = menu

+ 1 - 1
route/topic_delete.py

@@ -15,7 +15,7 @@ def topic_delete_2(conn, topic_num):
         curs.execute(db_change("delete from rd where title = ? and sub = ?"), [name, sub])
         conn.commit()
 
-        return redirect('/topic/' + url_pas(name))    
+        return redirect('/topic/' + url_pas(name))
     else:
         return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('topic_delete'), wiki_set(), custom(), other2([0, 0])],

+ 7 - 7
route/topic_stop.py

@@ -24,7 +24,7 @@ def topic_stop_2(conn, topic_num):
             curs.execute(db_change("update rd set stop = ?, agree = ? where title = ? and sub = ?"), [
                 stop_d,
                 agree_d,
-                name, 
+                name,
                 sub
             ])
 
@@ -36,17 +36,17 @@ def topic_stop_2(conn, topic_num):
                 t_state = 'Normal'
 
             curs.execute(db_change("insert into topic (id, title, sub, data, date, ip, block, top) values (?, ?, ?, ?, ?, ?, '', '1')"), [
-                str(int(topic_check[0][0]) + 1), 
-                name, 
-                sub, 
-                t_state + (' (Agree)' if agree_d != '' else '') + (('[br][br]Why : ' + why_d) if why_d else ''), 
-                time, 
+                str(int(topic_check[0][0]) + 1),
+                name,
+                sub,
+                t_state + (' (Agree)' if agree_d != '' else '') + (('[br][br]Why : ' + why_d) if why_d else ''),
+                time,
                 ip
             ])
 
             rd_plus(name, sub, time)
 
-        return redirect('/thread/' + str(topic_num))    
+        return redirect('/thread/' + str(topic_num))
     else:
         stop_d_list = ''
         agree_check = ''

+ 2 - 2
route/topic_tool.py

@@ -35,7 +35,7 @@ def topic_tool_2(conn, topic_num):
             <li>''' + load_lang('topic_state') + ''' : ''' + t_state + '' + (' (Agree)' if close_data and (close_data[0][1] == 'O') else '') + '''</li>
         </ul>
     '''
-    
+
     if admin_check(None) == 1:
         data += '''
             <h2>''' + load_lang('owner') + '''</h2>
@@ -48,7 +48,7 @@ def topic_tool_2(conn, topic_num):
             </ul>
         '''
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('topic_tool'), wiki_set(), custom(), other2([0, 0])],
         data = data,
         menu = [['thread/' + str(topic_num), load_lang('return')]]

+ 3 - 3
route/topic_top.py

@@ -6,7 +6,7 @@ def topic_top_2(conn, topic_num, num):
     topic_change_data = topic_change(topic_num)
     name = topic_change_data[0]
     sub = topic_change_data[1]
-    
+
     if admin_check(3, 'notice (' + name + ' - ' + sub + '#' + str(num) + ')') != 1:
         return re_error('/error/3')
 
@@ -19,9 +19,9 @@ def topic_top_2(conn, topic_num, num):
                 curs.execute(db_change("update topic set top = '' where title = ? and sub = ? and id = ?"), [name, sub, str(num)])
             else:
                 curs.execute(db_change("update topic set top = 'O' where title = ? and sub = ? and id = ?"), [name, sub, str(num)])
-        
+
         rd_plus(name, sub, get_time())
 
         conn.commit()
 
-    return redirect('/thread/' + str(topic_num) + '#' + str(num))        
+    return redirect('/thread/' + str(topic_num) + '#' + str(num))

+ 1 - 1
route/user_count_edit.py

@@ -22,7 +22,7 @@ def user_count_edit_2(conn, name):
     else:
         t_data = 0
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('count'), wiki_set(), custom(), other2([0, 0])],
         data =  '''
                 <ul>

+ 3 - 3
route/user_custom_head_view.py

@@ -12,7 +12,7 @@ def user_custom_head_view_2(conn):
                 curs.execute(db_change("update custom set css = ? where user = ?"), [flask.request.form.get('content', None), ip + ' (head)'])
             else:
                 curs.execute(db_change("insert into custom (user, css) values (?, ?)"), [ip + ' (head)', flask.request.form.get('content', None)])
-            
+
             conn.commit()
 
         flask.session['head'] = flask.request.form.get('content', None)
@@ -30,7 +30,7 @@ def user_custom_head_view_2(conn):
                 data = ''
         else:
             start = '<span>' + load_lang('user_head_warring') + '</span><hr class=\"main_hr\">'
-            
+
             if 'head' in flask.session:
                 data = flask.session['head']
             else:
@@ -38,7 +38,7 @@ def user_custom_head_view_2(conn):
 
         start += '<span>&lt;style&gt;CSS&lt;/style&gt;<br>&lt;script&gt;JS&lt;/script&gt;</span><hr class=\"main_hr\">'
 
-        return easy_minify(flask.render_template(skin_check(), 
+        return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang(data = 'user_head', safe = 1), wiki_set(), custom(), other2([0, 0])],
             data =  start + '''
                     <form method="post">

+ 3 - 3
route/user_info.py

@@ -12,7 +12,7 @@ def user_info_2(conn):
     else:
         plus2 = '<li><a href="/alarm">' + load_lang('alarm') + ' (0)</a></li>'
 
-    if ip_or_user(ip) == 0:  
+    if ip_or_user(ip) == 0:
         plus = '''
             <li><a href="/logout">''' + load_lang('logout') + '''</a></li>
             <li><a href="/change">''' + load_lang('user_setting') + '''</a></li>
@@ -20,7 +20,7 @@ def user_info_2(conn):
 
         plus2 += '<li><a href="/watch_list">' + load_lang('watchlist') + '</a></li>'
         plus3 = '<li><a href="/acl/user:' + url_pas(ip) + '">' + load_lang('user_document_acl') + '</a></li>'
-    else:        
+    else:
         plus = '''
             <li><a href="/login">''' + load_lang('login') + '''</a></li>
             <li><a href="/register">''' + load_lang('register') + '''</a></li>
@@ -32,7 +32,7 @@ def user_info_2(conn):
         if test and test[0][0] != '':
             plus += '<li><a href="/pass_find">' + load_lang('password_search') + '</a></li>'
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('user_tool'), wiki_set(), custom(), other2([0, 0])],
         data = '''
             <h2>''' + load_lang('state') + '''</h2>

+ 5 - 5
route/user_setting.py

@@ -10,7 +10,7 @@ def user_setting_2(conn, server_init):
         return re_error('/ban')
 
     if ip_or_user(ip) == 0:
-        if flask.request.method == 'POST':    
+        if flask.request.method == 'POST':
             auto_list = ['email', 'skin', 'lang']
 
             for auto_data in auto_list:
@@ -22,9 +22,9 @@ def user_setting_2(conn, server_init):
                         curs.execute(db_change("insert into user_set (name, id, data) values (?, ?, ?)"), [auto_data, ip, flask.request.form.get(auto_data, '')])
 
             conn.commit()
-            
+
             return redirect('/change')
-        else:        
+        else:
             curs.execute(db_change('select data from user_set where name = "email" and id = ?'), [ip])
             data = curs.fetchall()
             if data:
@@ -58,12 +58,12 @@ def user_setting_2(conn, server_init):
                     oauth_content += '<li>{}</li>'.format(oauth_provider[i].capitalize() + ' : <img src="{}" width="17px" height="17px"> {}'.format(oauth_data[0][1], oauth_data[0][0]))
                 else:
                     oauth_content += '<li>{}</li>'.format(oauth_provider[i].capitalize() + ' <a href="/oauth/{}/init">({})</a>'.format(oauth_provider[i], load_lang('connect')))
-            
+
             oauth_content += '</ul>'
 
             http_warring = '<hr class=\"main_hr\"><span>' + load_lang('http_warring') + '</span>'
 
-            return easy_minify(flask.render_template(skin_check(),    
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('user_setting'), wiki_set(), custom(), other2([0, 0])],
                 data = '''
                     <form method="post">

+ 4 - 4
route/user_tool.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def user_tool_2(conn, name):
     curs = conn.cursor()
-    
+
     data = '''
         <h2>''' + load_lang('tool') + '''</h2>
         <ul>
@@ -10,14 +10,14 @@ def user_tool_2(conn, name):
             <li><a href="/topic/user:''' + url_pas(name) + '''">''' + load_lang('user_discussion') + '''</a></li>
         </ul>
     '''
-            
+
     if admin_check(1) == 1:
         curs.execute(db_change("select block from ban where block = ?"), [name])
         if curs.fetchall():
             ban_name = load_lang('ban_release')
         else:
             ban_name = load_lang('ban')
-    
+
         data += '''
             <h2>''' + load_lang('admin') + '''</h2>
             <ul>
@@ -26,7 +26,7 @@ def user_tool_2(conn, name):
             </ul>
         '''
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [name, wiki_set(), custom(), other2([' (' + load_lang('tool') + ')', 0])],
         data = data,
         menu = 0

+ 3 - 3
route/view_diff_data.py

@@ -21,11 +21,11 @@ def view_diff_data_2(conn, name):
         if second_raw_data:
             if first == second:
                 result = ''
-            else:            
+            else:
                 diff_data = difflib.SequenceMatcher(None, first_raw_data[0][0], second_raw_data[0][0])
                 result = '<pre>' + diff(diff_data) + '</pre>'
-            
-            return easy_minify(flask.render_template(skin_check(), 
+
+            return easy_minify(flask.render_template(skin_check(),
                 imp = [name, wiki_set(), custom(), other2([' (' + load_lang('compare') + ')', 0])],
                 data = result,
                 menu = [['history/' + url_pas(name), load_lang('return')]]

+ 3 - 3
route/view_down.py

@@ -8,10 +8,10 @@ def view_down_2(conn, name):
     curs.execute(db_change("select title from data where title like ?"), [name + '/%'])
     for data in curs.fetchall():
         div += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'
-        
+
     div += '</ul>'
-    
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [name, wiki_set(), custom(), other2([' (' + load_lang('sub') + ')', 0])],
         data = div,
         menu = [['w/' + url_pas(name), load_lang('return')]]

+ 9 - 9
route/view_raw.py

@@ -11,22 +11,22 @@ def view_raw_2(conn, name, topic_num, num):
         topic_change_data = topic_change(topic_num)
         name = topic_change_data[0]
         sub_title = topic_change_data[1]
-    
+
     v_name = name
     sub = ' (' + load_lang('raw') + ')'
-    
+
     if not num:
         num = flask.request.args.get('num', None)
         if num:
             num = int(number_check(num))
-    
+
     if not sub_title and num:
         curs.execute(db_change("select title from history where title = ? and id = ? and hide = 'O'"), [name, str(num)])
         if curs.fetchall() and admin_check(6) != 1:
             return re_error('/error/3')
-        
+
         curs.execute(db_change("select data from history where title = ? and id = ?"), [name, str(num)])
-        
+
         sub += ' (r' + str(num) + ')'
 
         menu = [['history/' + url_pas(name), load_lang('history')]]
@@ -35,22 +35,22 @@ def view_raw_2(conn, name, topic_num, num):
             curs.execute(db_change("select data from topic where id = ? and title = ? and sub = ? and block = ''"), [str(num), name, sub_title])
         else:
             curs.execute(db_change("select data from topic where id = ? and title = ? and sub = ?"), [str(num), name, sub_title])
-        
+
         v_name = load_lang('discussion_raw')
         sub = ' (#' + str(num) + ')'
 
         menu = [['topic/' + url_pas(name) + '/sub/' + url_pas(sub_title) + '#' + str(num), load_lang('discussion')], ['topic/' + url_pas(name) + '/sub/' + url_pas(sub_title) + '/admin/' + str(num), load_lang('return')]]
     else:
         curs.execute(db_change("select data from data where title = ?"), [name])
-        
+
         menu = [['w/' + url_pas(name), load_lang('return')]]
 
     data = curs.fetchall()
     if data:
         p_data = html.escape(data[0][0])
         p_data = '<textarea readonly rows="25">' + p_data + '</textarea>'
-        
-        return easy_minify(flask.render_template(skin_check(), 
+
+        return easy_minify(flask.render_template(skin_check(),
             imp = [v_name, wiki_set(), custom(), other2([sub, 0])],
             data = p_data,
             menu = menu

+ 24 - 24
route/view_read.py

@@ -17,7 +17,7 @@ def view_read_2(conn, name):
             r_db = curs.fetchall()
             if r_db:
                 r_data = link_fix(r_db[0][0])
-            
+
                 return redirect('/w/' + r_data[0] + '?from=' + name + r_data[1])
 
     curs.execute(db_change("select sub from rd where title = ? and not stop = 'O' order by date desc"), [name])
@@ -27,27 +27,27 @@ def view_read_2(conn, name):
         topic = 0
 
     curs.execute(db_change("select link from back where title = ? and type = 'cat' order by link asc"), [name])
-                
+
     curs.execute(db_change("select title from data where title like ?"), ['%' + name + '/%'])
     if curs.fetchall():
         down = 1
     else:
         down = 0
-        
+
     m = re.search("^(.*)\/(.*)$", name)
     if m:
         uppage = m.groups()[0]
     else:
         uppage = 0
-        
-    if re.search('^category:', name):        
+
+    if re.search('^category:', name):
         curs.execute(db_change("select link from back where title = ? and type = 'cat' order by link asc"), [name])
         back = curs.fetchall()
         if back:
             div = '<br><h2 id="cate_normal">' + load_lang('category') + '</h2><ul>'
             u_div = ''
 
-            for data in back:    
+            for data in back:
                 if re.search('^category:', data[0]):
                     u_div += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'
                 else:
@@ -55,14 +55,14 @@ def view_read_2(conn, name):
                     db_data = curs.fetchall()
                     if db_data:
                         div += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a> <a id="inside" href="/xref/' + url_pas(data[0]) + '">(' + load_lang('backlink') + ')</a></li>'
-                    else: 
+                    else:
                         div += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'
 
             div += '</ul>'
-            
+
             if div == '<br><h2 id="cate_normal">' + load_lang('category') + '</h2><ul></ul>':
                 div = ''
-            
+
             if u_div != '':
                 div += '<br><h2 id="cate_under">' + load_lang('under_category') + '</h2><ul>' + u_div + '</ul>'
 
@@ -75,7 +75,7 @@ def view_read_2(conn, name):
         curs.execute(db_change("select title, data from history where title = ? and id = ?"), [name, str(num)])
     else:
         curs.execute(db_change("select title, data from data where title = ?"), [name])
-    
+
     data = curs.fetchall()
     if data:
         else_data = data[0][1]
@@ -86,11 +86,11 @@ def view_read_2(conn, name):
     data = curs.fetchall()
     if data:
         acl = 1
-            
+
     if flask.request.args.get('from', None) and else_data:
         else_data = re.sub('^\r\n', '', else_data)
         else_data = re.sub('\r\n$', '', else_data)
-            
+
     end_data = render_set(
         title = name,
         data = else_data
@@ -98,7 +98,7 @@ def view_read_2(conn, name):
 
     if end_data == 'HTTP Request 401.3':
         response_data = 401
-        
+
         curs.execute(db_change('select data from other where name = "error_401"'))
         sql_d = curs.fetchall()
         if sql_d and sql_d[0][0] != '':
@@ -107,14 +107,14 @@ def view_read_2(conn, name):
             end_data = '<h2>' + load_lang('error') + '</h2><ul><li>' + load_lang('authority_error') + '</li></ul>'
     elif end_data == 'HTTP Request 404':
         response_data = 404
-        
+
         curs.execute(db_change('select data from other where name = "error_404"'))
         sql_d = curs.fetchall()
         if sql_d and sql_d[0][0] != '':
             end_data = '<h2>' + load_lang('error') + '</h2><ul><li>' + sql_d[0][0] + '</li></ul>'
         else:
             end_data = '<h2>' + load_lang('error') + '</h2><ul><li>' + load_lang('decument_404_error') + '</li></ul>'
-            
+
         curs.execute(db_change('select ip, date, leng, send from history where title = ? order by id desc limit 3'), [name])
         sql_d = curs.fetchall()
         if sql_d:
@@ -126,13 +126,13 @@ def view_read_2(conn, name):
                     leng = '<span style="color:red;">(' + i[2] + ')</span>'
                 else:
                     leng = '<span style="color:gray;">(' + i[2] + ')</span>'
-            
+
                 end_data += '<li>' + i[1] + ' | ' + ip_pas(i[0]) + ' | ' + leng + (' | ' + i[3] if i[3] != '' else '') + '</li>'
-                
+
             end_data += '<li><a href="/history/' + url_pas(name) + '">(...)</a></li></ul>'
     else:
         response_data = 200
-    
+
     if num:
         menu = [['history/' + url_pas(name), load_lang('history')]]
         sub = ' (r' + str(num) + ')'
@@ -160,7 +160,7 @@ def view_read_2(conn, name):
 
         if down:
             menu += [['down/' + url_pas(name), load_lang('sub')]]
-    
+
         curs.execute(db_change("select date from history where title = ? order by date desc limit 1"), [name])
         date = curs.fetchall()
         if date:
@@ -169,7 +169,7 @@ def view_read_2(conn, name):
             r_date = 0
 
     div = end_data + div
-            
+
     adsense_code = '<div align="center" style="display: block; margin-bottom: 10px;">{}</div>'
 
     curs.execute(db_change("select data from other where name = 'adsense'"))
@@ -179,7 +179,7 @@ def view_read_2(conn, name):
         adsense_code = adsense_code.format(curs.fetchall()[0][0])
     else:
         adsense_code = adsense_code.format('')
-    
+
     div = adsense_code + '<div>' + div + '</div>'
 
     match = re.search("^user:([^/]*)", name)
@@ -194,7 +194,7 @@ def view_read_2(conn, name):
     body = curs.fetchall()
     if body:
         div = body[0][0] + '<hr class=\"main_hr\">' + div
-        
+
     curs.execute(db_change("select data from other where name = 'bottom_body'"))
     body = curs.fetchall()
     if body:
@@ -208,8 +208,8 @@ def view_read_2(conn, name):
             watch_list = 1
     else:
         watch_list = 0
-        
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [flask.request.args.get('show', name), wiki_set(), custom(), other2([sub, r_date, watch_list])],
         data = div,
         menu = menu

+ 9 - 9
route/view_xref.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def view_xref_2(conn, name):
     curs = conn.cursor()
-    
+
     if acl_check(name, 'render') == 1:
         return re_error('/ban')
 
@@ -11,12 +11,12 @@ def view_xref_2(conn, name):
         sql_num = num * 50 - 50
     else:
         sql_num = 0
-        
+
     div = '<ul>'
 
     if re.search('#', name):
         name = re.sub('#', '\\\\#', name)
-    
+
     curs.execute(db_change("" + \
         "select link, type from back " + \
         "where (title = ? and not type = 'cat' and not type = 'no') or (title like ? and type = 'redirect')" + \
@@ -29,20 +29,20 @@ def view_xref_2(conn, name):
     data_list = curs.fetchall()
     for data in data_list:
         div += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a>'
-        
-        if data[1]:                
+
+        if data[1]:
             div += ' (' + data[1] + ')'
-        
+
         curs.execute(db_change("select title from back where title = ? and type = 'include'"), [data[0]])
         db_data = curs.fetchall()
         if db_data:
             div += ' <a id="inside" href="/xref/' + url_pas(data[0]) + '">(' + load_lang('backlink') + ')</a>'
 
         div += '</li>'
-      
+
     div += '</ul>' + next_fix('/xref/' + url_pas(name) + '?num=', num, data_list)
-    
-    return easy_minify(flask.render_template(skin_check(), 
+
+    return easy_minify(flask.render_template(skin_check(),
         imp = [name, wiki_set(), custom(), other2([' (' + load_lang('backlink') + ')', 0])],
         data = div,
         menu = [['w/' + url_pas(name), load_lang('return')]]

+ 2 - 2
route/watch_list.py

@@ -4,7 +4,7 @@ def watch_list_2(conn):
     curs = conn.cursor()
 
     div = 'Limit : 10<hr class=\"main_hr\">'
-    ip = ip_check()    
+    ip = ip_check()
 
     if ip_or_user(ip) != 0:
         return redirect('/login')
@@ -22,7 +22,7 @@ def watch_list_2(conn):
 
     div += '<a href="/manager/13">(' + load_lang('add') + ')</a>'
 
-    return easy_minify(flask.render_template(skin_check(), 
+    return easy_minify(flask.render_template(skin_check(),
         imp = [load_lang('watchlist'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['manager', load_lang('return')]]

+ 2 - 2
route/watch_list_name.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 def watch_list_name_2(conn, name):
     curs = conn.cursor()
-    
+
     ip = ip_check()
     if ip_or_user(ip) != 0:
         return redirect('/login')
@@ -17,7 +17,7 @@ def watch_list_name_2(conn, name):
         curs.execute(db_change("delete from scan where user = ? and title = ?"), [ip, name])
     else:
         curs.execute(db_change("insert into scan (user, title) values (?, ?)"), [ip, name])
-    
+
     conn.commit()
 
     return redirect('/watch_list')

+ 3 - 3
views/main_css/js/do_insert_data.js

@@ -1,16 +1,16 @@
 // https://stackoverflow.com/questions/11076975/insert-text-into-textarea-at-cursor-position-javascript
 
 function do_insert_data(name, data) {
-    if(document.selection) { 
+    if(document.selection) {
         document.getElementById(name).focus();
 
         sel = document.selection.createRange();
-        sel.text = data; 
+        sel.text = data;
     } else if(document.getElementById(name).selectionStart || document.getElementById(name).selectionStart == '0') {
         var startPos = document.getElementById(name).selectionStart;
         var endPos = document.getElementById(name).selectionEnd;
 
-        document.getElementById(name).value = document.getElementById(name).value.substring(0, startPos) + data + document.getElementById(name).value.substring(endPos, document.getElementById(name).value.length); 
+        document.getElementById(name).value = document.getElementById(name).value.substring(0, startPos) + data + document.getElementById(name).value.substring(endPos, document.getElementById(name).value.length);
     } else {
         document.getElementById(name).value += data;
     }

+ 4 - 4
views/main_css/js/do_open_folding.js

@@ -1,10 +1,10 @@
-function do_open_folding(data, element) { 
+function do_open_folding(data, element) {
     var fol = document.getElementById(data);
-    if(fol.style.display === '' || (fol.style.display === 'inline-block' || fol.style.display === 'block')) { 
+    if(fol.style.display === '' || (fol.style.display === 'inline-block' || fol.style.display === 'block')) {
         document.getElementById(data).style.display = 'none';
         element.innerHTML = '[+]'
     } else {
         document.getElementById(data).style.display = 'block';
-        element.innerHTML = '[-]' 
-    } 
+        element.innerHTML = '[-]'
+    }
 }

+ 1 - 1
views/main_css/js/do_open_foot.js

@@ -17,5 +17,5 @@ function do_open_foot(name, num = 0) {
         }
     }
 
-    
+
 }

+ 1 - 1
views/main_css/js/do_stop_exit.js

@@ -6,7 +6,7 @@ function do_stop_exit() {
         data = document.getElementById('content').value;
         origin = document.getElementById('origin').value;
         if(data !== origin && go_save_zone != 1) {
-            return ''; 
+            return '';
         }
     }
 }

+ 5 - 5
views/main_css/js/dummy_do_open_foot.js

@@ -5,15 +5,15 @@ function dummy_do_open_foot(name) {
     } else {
         var o_data = document.getElementById('c' + name);
     }
-    
+
     var g_data = document.getElementById(name.replace(/\.([0-9]+)$/, ''));
 
     if(o_data.innerHTML === '') {
         o_data.style.display = 'block';
-        o_data.innerHTML += '' + 
-            '<div class="foot_in">' + 
-                '<a onclick="do_open_foot(\'' + name + '\')" href="javascript:void(0);">(X)</a> <a onclick="do_open_foot(\'' + name + '\')" href="#' + name + '">(Go)</a> ' + g_data.innerHTML + 
-            '</div>' + 
+        o_data.innerHTML += '' +
+            '<div class="foot_in">' +
+                '<a onclick="do_open_foot(\'' + name + '\')" href="javascript:void(0);">(X)</a> <a onclick="do_open_foot(\'' + name + '\')" href="#' + name + '">(Go)</a> ' + g_data.innerHTML +
+            '</div>' +
         '';
     } else {
         o_data.style.display = 'none';

+ 2 - 2
views/main_css/js/load_include.js

@@ -2,7 +2,7 @@ function load_include(title, name, p_data) {
     var o_data = document.getElementById(name);
 
     var url = "/api/w/" + encodeURI(title) + "?include=" + name;
-    
+
     var xhr = new XMLHttpRequest();
     xhr.open("GET", url, true);
     xhr.send(null);
@@ -11,7 +11,7 @@ function load_include(title, name, p_data) {
         if(this.readyState === 4 && this.status === 200) {
             var o_p_data = JSON.parse(this.responseText);
             var g_data = o_p_data['data'];
-            
+
             for(key in p_data) {
                 try {
                     var patt = new RegExp('@' + p_data[key][0] + '@', 'g');

+ 1 - 1
views/main_css/js/load_preview.js

@@ -7,7 +7,7 @@ function load_preview(name) {
 
     var url = "/api/w/" + name;
     var url_2 = "/api/markup";
-    
+
     var xhr = new XMLHttpRequest();
     xhr.open("POST", url, true);
     xhr.send(s_data);

+ 1 - 1
views/main_css/js/load_user_info.js

@@ -2,7 +2,7 @@ function load_user_info(name) {
     var n_ver = document.getElementById('get_user_info');
 
     var url = "/api/user_info/" + encodeURI(name) + "?render=1";
-    
+
     var xhr = new XMLHttpRequest();
     xhr.open("GET", url, true);
     xhr.send(null);

+ 1 - 1
views/main_css/js/load_ver.js

@@ -2,7 +2,7 @@ function load_ver() {
     var n_ver = document.getElementById('ver_send');
 
     var url = "/api/version";
-    
+
     var xhr = new XMLHttpRequest();
     xhr.open("GET", url, true);
     xhr.send(null);

+ 3 - 3
views/main_css/js/render_html.js

@@ -2,7 +2,7 @@ function render_html(name = '') {
     var num = 0;
     while(1) {
         num += 1
-        
+
         if(document.getElementById(name + '_' + String(num))) {
             data = document.getElementById(name + '_' + String(num)).innerHTML;
 
@@ -11,7 +11,7 @@ function render_html(name = '') {
                 var patt = new RegExp('&lt;' + t_data[key] + '&gt;((?:(?!&lt;\/' + t_data[key] + '&gt;).)*)&lt;\/' + t_data[key] + '&gt;', 'ig');
                 data = data.replace(patt, '<' + t_data[key] + '>$1</' + t_data[key] + '>');
             }
-            
+
             var src_list = {
                 'www.youtube.com' : '1',
                 'www.google.com' : '1'
@@ -38,7 +38,7 @@ function render_html(name = '') {
             data = data.replace(/&lt;a href=["\']((?:(?!["\']).)+)["\']&gt;((?:(?!&lt;\/a&gt;).)*)&lt;\/a&gt;/ig, function(full, in_data, in_data_2) {
                 return '<a id="out_link" href="' + in_data.replace(/^javascript/ig, '') + '">' + in_data_2 + '</a>'
             });
-            
+
             document.getElementById(name + '_' + String(num)).innerHTML = data;
         } else {
             break;

+ 1 - 1
views/main_css/js/render_markdown.js

@@ -5,6 +5,6 @@ function render_markdown() {
     data = data.replace(/__((?:(?!__).)+)__/, '<b>$1</b>');
     data = data.replace(/\*((?:(?!\*).)+)\*/, '<i>$1</i>');
     data = data.replace(/_((?:(?!_).)+)_/, '<i>$1</i>');
-    
+
     document.getElementById('render_contect').innerHTML = data;
 }

+ 3 - 3
views/main_css/js/shotcuts_set.js

@@ -12,7 +12,7 @@ var check = setInterval(function() {
                 window.location.href = element[1];
             }, {
                 'disable_in_input' : true
-            }); 
+            });
         });
 
         all_list_2 = [
@@ -21,10 +21,10 @@ var check = setInterval(function() {
             ['E', '/edit'],
         ];
 
-        all_list_2.forEach(function(element) {    
+        all_list_2.forEach(function(element) {
             shortcut.add(element[0], function() {
                 href_d = window.location.href.split("/");
-                if(href_d[4]) { 
+                if(href_d[4]) {
                     window.location.href = element[1] + '/' + href_d[4];
                 }
             }, {

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است