fixed markdown bleach renderer again

This commit is contained in:
vabene1111
2020-05-02 15:10:15 +02:00
parent 37f7326f4c
commit 4c08ade3ee

View File

@@ -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)