@staticmethod
def md_escape(text):
    """
        Escape potential Markdown syntax in a string.
        This is meant to be passed to the templates.
        """
    specialchars = '\\`*_{}[]()#+-.!'
    s = ''
    for c in text:
        if c in specialchars:
            s += '\\'
        s += c
    return s
