This commit is contained in:
Aevann1 2021-10-09 15:49:13 +02:00
parent 9e7e4173dd
commit 6405dc208e
8 changed files with 10 additions and 16 deletions

View file

@ -46,7 +46,7 @@ blockquote {
} }
html * { html * {
font-family: arial, helvetica, sans-serif; font-family: arial, helvetica, sans-serif !important;
color: #800000 color: #800000
} }
body, #main-content-col { body, #main-content-col {

View file

@ -24,7 +24,7 @@
* { * {
font-family: 'Lato'; font-family: 'Lato' !important;
} }
blockquote { blockquote {

View file

@ -36,7 +36,7 @@
} }
* { * {
font-family: 'Roboto Mono'; font-family: 'Roboto Mono' !important;
} }
.arrow-up::before { .arrow-up::before {

View file

@ -25,7 +25,7 @@
box-shadow: none !important; box-shadow: none !important;
transition: none !important; transition: none !important;
border-radius: 0 !important; border-radius: 0 !important;
font-family: sans-serif; font-family: sans-serif !important;
font-size: 12px; font-size: 12px;
} }

View file

@ -148,7 +148,7 @@ def api_comment(v):
if not body and not request.files.get('file'): return {"error":"You need to actually write something!"}, 400 if not body and not request.files.get('file'): return {"error":"You need to actually write something!"}, 400
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE): for i in re.finditer('(^| )(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})') if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})')
body = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body) body = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body)
@ -579,7 +579,7 @@ def edit_comment(cid, v):
if c.is_banned or c.deleted_utc > 0: abort(403) if c.is_banned or c.deleted_utc > 0: abort(403)
body = request.values.get("body", "")[:10000] body = request.values.get("body", "")[:10000]
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE): for i in re.finditer('(^| )(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})') if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})')
body_md = CustomRenderer().render(mistletoe.Document(body)) body_md = CustomRenderer().render(mistletoe.Document(body))
body_html = sanitize(body_md) body_html = sanitize(body_md)

View file

@ -206,7 +206,7 @@ def edit_post(pid, v):
p.title_html = filter_title(title) p.title_html = filter_title(title)
if body != p.body: if body != p.body:
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE): for i in re.finditer('(^| )(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})') if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})')
body_md = CustomRenderer().render(mistletoe.Document(body)) body_md = CustomRenderer().render(mistletoe.Document(body))
body_html = sanitize(body_md) body_html = sanitize(body_md)
@ -665,7 +665,7 @@ def submit_post(v):
if request.headers.get("Authorization"): return {"error":"2048 character limit for URLs."}, 400 if request.headers.get("Authorization"): return {"error":"2048 character limit for URLs."}, 400
else: return render_template("submit.html", v=v, error="2048 character limit for URLs.", title=title, url=url,body=request.values.get("body", "")), 400 else: return render_template("submit.html", v=v, error="2048 character limit for URLs.", title=title, url=url,body=request.values.get("body", "")), 400
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE): for i in re.finditer('(^| )(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})') if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})')
body = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body) body = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body)

View file

@ -103,7 +103,7 @@ def settings_profile_post(v):
if request.values.get("bio"): if request.values.get("bio"):
bio = request.values.get("bio")[:1500] bio = request.values.get("bio")[:1500]
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', bio, re.MULTILINE): for i in re.finditer('(^| )(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', bio, re.MULTILINE):
if "wikipedia" not in i.group(1): bio = bio.replace(i.group(1), f'![]({i.group(1)})') if "wikipedia" not in i.group(1): bio = bio.replace(i.group(1), f'![]({i.group(1)})')
bio = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', bio) bio = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', bio)
@ -199,6 +199,7 @@ def settings_profile_post(v):
theme = request.values.get("theme") theme = request.values.get("theme")
if theme: if theme:
v.theme = theme v.theme = theme
if theme == "win98": v.themecolor = "30409f"
updated = True updated = True
quadrant = request.values.get("quadrant") quadrant = request.values.get("quadrant")

View file

@ -366,13 +366,6 @@
} }
} }
</style> </style>
<!--[if mso]>
<style type="text/css">
.f-fallback {
font-family: Arial, sans-serif;
}
</style>
<![endif]-->
</head> </head>
<body> <body>
<span class="preheader">{% block preheader %}Thanks for joining {{'SITE_NAME' | app_config}}! Please take a sec to verify the email you used to sign up.{% endblock %}</span> <span class="preheader">{% block preheader %}Thanks for joining {{'SITE_NAME' | app_config}}! Please take a sec to verify the email you used to sign up.{% endblock %}</span>