escape_md function

Escape special characters for Markdown