greentext fix

master
Aevann1 2022-06-19 17:22:06 +02:00
parent c02f835708
commit 5ddde69ac9
3 changed files with 3 additions and 3 deletions

View File

@ -1015,6 +1015,6 @@ procoins_li = (0,2500,5000,10000,25000,50000,125000,250000)
linefeeds_regex = re.compile("([^\n])\n([^\n])", flags=re.A) linefeeds_regex = re.compile("([^\n])\n([^\n])", flags=re.A)
greentext_regex = re.compile(">([^ ][^\n]*)", flags=re.A) greentext_regex = re.compile("(\n|^)>([^ ][^\n]*)", flags=re.A)
def make_name(*args, **kwargs): return request.base_url def make_name(*args, **kwargs): return request.base_url

View File

@ -170,7 +170,7 @@ def sanitize(sanitized, alert=False, edit=False):
if '```' not in sanitized and '<pre>' not in sanitized: if '```' not in sanitized and '<pre>' not in sanitized:
sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized) sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized)
sanitized = greentext_regex.sub(r'<g>\>\1</g>', sanitized) sanitized = greentext_regex.sub(r'\1<g>\>\2</g>', sanitized)
sanitized = image_regex.sub(r'\1![](\2)\5', sanitized) sanitized = image_regex.sub(r'\1![](\2)\5', sanitized)

View File

@ -21,7 +21,7 @@ set CACHE_VER = {
'js/formatting.js': 240, 'js/formatting.js': 240,
'js/header.js': 272, 'js/header.js': 272,
'js/lottery.js': 254, 'js/lottery.js': 254,
'js/marked.js': 261, 'js/marked.js': 262,
'js/submit.js': 262, 'js/submit.js': 262,
'js/userpage.js': 241, 'js/userpage.js': 241,
'js/userpage_v.js': 245, 'js/userpage_v.js': 245,