hotosm/osm-tasking-manager2 — pull request #494 by ethan-nelson (2014-12-15 21:58:58+00:00)
Title: Changing sanitation order for Markdown; re: #456

#456 describes issues with headers in Markdown. This is the result of the bleach module sanitizing the Markdown-formatted text. Thus, I rearranged the order of the call to display the project description:

Old:
Raw input converted via markdown to html formatting -> markdown formatted text then sanitized.

New:
Raw input sanitized, html removed -> sanitized input then converted via markdown to html formatting.

Based on [this](http://pythonhosted.org/Markdown/#goals), it should be safe to assume that markdown cannot create malicious html code by itself. So, with input sanitized of HTML formatting prior to Markdown conversion, the text should be safe.

Example:
![headers](https://cloud.githubusercontent.com/assets/8998918/5444715/ebcefe5a-8472-11e4-85f8-6dca8288a2e6.JPG)