def escape(thing):
    """Returns string with underscores and asterisks escaped
    for use with Markdown"""
    string = str(thing)
    string = string.replace("_", r"\_")
    string = string.replace("*", r"\*")
    return string