diff --git a/functions.py b/functions.py index 644ff99..bd3fb16 100644 --- a/functions.py +++ b/functions.py @@ -420,11 +420,11 @@ def renderMarkdown(text): 'hr', 'img' ] - allowed_attrs = { - 'a': 'href', - 'button': 'class', - 'img': ['src', 'width', 'height', 'alt', 'class', 'loading', 'title'] - } + # allowed_attrs = { + # 'a': 'href', + # 'button': 'class', + # # 'img': ['src', 'width', 'height', 'alt', 'class', 'loading', 'title'] + # } # hard_wrap=True means that newlines will be # converted into
tags # @@ -437,10 +437,10 @@ def renderMarkdown(text): plugins=plugins, hard_wrap=True ) - html = md(text) - cleaner = Cleaner(tags=allowed_tags, attributes=allowed_attrs) - clean_html = cleaner.clean(html) - return Markup(clean_html) + cleaner = Cleaner(tags=allowed_tags) + clean_text = cleaner.clean(text) + html = md(clean_text) + return Markup(html) def generateMetadata(question=None, answer=None): metadata = {