Conditions | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 6 | ||
Bugs | 0 | Features | 0 |
1 | import bleach |
||
51 | def render(self, text): |
||
52 | """ Convert the given text into html """ |
||
53 | converted = markdown( |
||
54 | text, |
||
55 | extensions=MarkdownRenderer.get_extensions(), |
||
56 | output_format='html5') |
||
57 | |||
58 | cleaned = bleach.clean( |
||
59 | converted, |
||
60 | attributes=self.MARKDOWN_ATTRS, |
||
61 | tags=self.MARKDOWN_TAGS) |
||
62 | |||
63 | return mark_safe(cleaned) |
||
64 |