diff --git a/files/helpers/const.py b/files/helpers/const.py index 953c93983..3efa30905 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -1015,5 +1015,6 @@ procoins_li = (0,2500,5000,10000,25000,50000,125000,250000) 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 \ No newline at end of file diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index a6dfdfb47..daaa9bcbe 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -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', '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',] @@ -170,6 +170,8 @@ def sanitize(sanitized, alert=False, edit=False): if '```' not in sanitized and '
' not in sanitized: sanitized = linefeeds_regex.sub(r'\1\n\n\2', sanitized) + sanitized = greentext_regex.sub(r'\>\1 ', sanitized) + sanitized = image_regex.sub(r'\1![](\2)\5', sanitized) sanitized = image_check_regex.sub(r'\1', sanitized) diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index a336873a1..e02829167 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -1,6 +1,6 @@ {%- set CACHE_VER = { - 'css/main.css': 326, + 'css/main.css': 327, 'css/4chan.css': 61, 'css/classic.css': 61,