Files @ 21b2a01a8413
Branch filter:

Location: symposion_app/symposion/markdown_parser.py

Sachi King
Py2 compatability has been broke elsewhere drop it

This is all noop in Py3, and Py2 is broke now in various places.
Dropping Py2 code as it will not be a thing going forward.

Django 2 is the next release, Py2 support will be dropped, as such,
dropping this is forward looking.
import bleach
import markdown


tags = bleach.sanitizer.ALLOWED_TAGS[:]
tags.extend(['p', 'pre'])


def parse(text):
    md = markdown.markdown(text, extensions=['extra'])
    text = bleach.clean(md, tags=tags)
    return text