Files @ 73f2cc1d1ce9
Branch filter:

Location: symposion_app/symposion/markdown_parser.py

Scott Bragg
Merge pull request #68 from jamezpolley/lca2017

Handle slots with no Proposal
from __future__ import unicode_literals

import markdown


def parse(text):

    # First run through the Markdown parser
    text = markdown.markdown(text, extensions=["extra"], safe_mode=False)

    # Sanitize using html5lib
    # bits = []
    # parser = html5parser.HTMLParser(tokenizer=sanitizer.HTMLSanitizer)
    # for token in parser.parseFragment(text).childNodes:
    #     bits.append(token.toxml())
    # return "".join(bits)
    return text