Python-Markdown includes features like escaping of raw HTML that are obviously intended to make it safe on untrusted input, and generally speaking Markdown is commonly used for rendering user input, such as right here on SO.
But is this implementation really trustworthy? Has anyone here studied it to decide it's safe to run on arbitrary input?
I see there is eg Markdown in Django XSS safe and Secure Python Markdown Library but is 'safe' mode really safe?