From 4c08ade3ee204c0830aeb91c6062a75bbda26b17 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sat, 2 May 2020 15:10:15 +0200 Subject: [PATCH] fixed markdown bleach renderer again --- cookbook/templatetags/custom_tags.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbook/templatetags/custom_tags.py b/cookbook/templatetags/custom_tags.py index 9f96792a6..99453b92e 100644 --- a/cookbook/templatetags/custom_tags.py +++ b/cookbook/templatetags/custom_tags.py @@ -30,4 +30,5 @@ def delete_url(model, pk): def markdown(value): tags = markdown_tags + ['pre', 'table', 'td', 'tr', 'th', 'tbody', 'style', 'thead'] parsed_md = md.markdown(value, extensions=['markdown.extensions.fenced_code', 'tables', UrlizeExtension(), MarkdownFormatExtension()]) + markdown_attrs['*'] = markdown_attrs['*'] + ['class'] return bleach.clean(parsed_md, tags, markdown_attrs)