symposion_app/vendor/symposion/text_parser.py
Sachi King d95d66dac8 Taking one out of PyCon's (US) book
We're lock-step with symposion, and upstream is dead.
Vendor it.
2017-05-27 20:11:39 +10:00

9 lines
175 B
Python

import bleach
tags = bleach.sanitizer.ALLOWED_TAGS[:]
tags.extend(['p', 'pre'])
def parse(text):
scrubbed_text = bleach.clean(text, tags=tags)
return scrubbed_text