forked from MarseyWorld/MarseyWorld
added greentext
parent
bb1d3677c5
commit
45b1b61760
|
@ -1015,5 +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)
|
||||||
|
|
||||||
def make_name(*args, **kwargs): return request.base_url
|
greentext_regex = re.compile(">([^ ][^\n]*)", flags=re.A)
|
||||||
|
|
||||||
|
def make_name(*args, **kwargs): return request.base_url
|
|
@ -37,7 +37,7 @@ TLDS = ( # Original gTLDs and ccTLDs
|
||||||
|
|
||||||
allowed_tags = ('b','blockquote','br','code','del','em','h1','h2','h3','h4','h5','h6','hr','i',
|
allowed_tags = ('b','blockquote','br','code','del','em','h1','h2','h3','h4','h5','h6','hr','i',
|
||||||
'li','ol','p','pre','strong','sub','sup','table','tbody','th','thead','td','tr','ul',
|
'li','ol','p','pre','strong','sub','sup','table','tbody','th','thead','td','tr','ul',
|
||||||
'marquee','a','span','ruby','rp','rt','spoiler','img','lite-youtube','video','source','audio')
|
'marquee','a','span','ruby','rp','rt','spoiler','img','lite-youtube','video','source','audio','g')
|
||||||
|
|
||||||
allowed_styles = ['color', 'background-color', 'font-weight', 'text-align', 'filter',]
|
allowed_styles = ['color', 'background-color', 'font-weight', 'text-align', 'filter',]
|
||||||
|
|
||||||
|
@ -170,6 +170,8 @@ 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 = image_regex.sub(r'\1![](\2)\5', sanitized)
|
sanitized = image_regex.sub(r'\1![](\2)\5', sanitized)
|
||||||
|
|
||||||
sanitized = image_check_regex.sub(r'\1', sanitized)
|
sanitized = image_check_regex.sub(r'\1', sanitized)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{%-
|
{%-
|
||||||
set CACHE_VER = {
|
set CACHE_VER = {
|
||||||
'css/main.css': 326,
|
'css/main.css': 327,
|
||||||
|
|
||||||
'css/4chan.css': 61,
|
'css/4chan.css': 61,
|
||||||
'css/classic.css': 61,
|
'css/classic.css': 61,
|
||||||
|
|
Loading…
Reference in New Issue