From a1e4da3964d5b774018abb1bced0694c462a5595 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 12 Oct 2021 07:26:58 +0200 Subject: [PATCH] fd --- files/routes/comments.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 137440641..46f1a7398 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -9,7 +9,9 @@ from files.routes.front import comment_idlist from pusher_push_notifications import PushNotifications from flask import * from files.__main__ import app, limiter +from mistune import Markdown +markdown = Markdown() site = environ.get("DOMAIN").strip() @@ -158,7 +160,7 @@ def api_comment(v): options.append(i.group(1)) body_md = body_md.replace(i.group(0), "") - body_md = CustomRenderer().render(mistletoe.Document(body_md)) + body_md = markdown(body_md) body_html = sanitize(body_md) bans = filter_comment_html(body_html)