Drop-in replacement for Textpattern's classTextile.php using PHP Markdown Lib and HTML Purifier