Moved Markdown from js to php