From 75b04140f3b4c26f5549e099ddc1ceae12a87629 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Tue, 25 Oct 2022 20:23:11 -0500 Subject: [PATCH] Update markdown --- judge/jinja2/markdown/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/judge/jinja2/markdown/__init__.py b/judge/jinja2/markdown/__init__.py index 9294742..6a081e5 100644 --- a/judge/jinja2/markdown/__init__.py +++ b/judge/jinja2/markdown/__init__.py @@ -48,6 +48,8 @@ ALLOWED_TAGS = bleach.sanitizer.ALLOWED_TAGS + [ "dt", "dd", "br", + "details", + "summary" ] ALLOWED_ATTRS = ["src", "width", "height", "href", "class"] @@ -55,9 +57,12 @@ ALLOWED_ATTRS = ["src", "width", "height", "href", "class"] @registry.filter def markdown(value): + print("BEFORE:", value) extensions = EXTENSIONS html = _markdown.markdown(value, extensions=extensions) html = bleach.clean(html, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRS) if not html: html = escape(value) + print("AFTER") + print(html) return '
%s
' % html