def sanitize(text):
    """We need to hEsc the markdown text.

    But markdown does an extra layer of escaping `&` inside `href` attributes.
    We have to unescape doubly escaped `&`.
    """
    return text.replace("&amp;amp;", "&amp;")