def curly_bracket_to_img_link(cb):
    """
    Takes the curly-bracket notation for some mana type
    and creates the appropriate image html tag.
    """
    file_safe_name = cb[1:-1].replace('/', '_').replace(' ', '_')
    ext = 'png' if 'Phyrexian' in file_safe_name or file_safe_name in ('C', 'E') else 'gif'
    return f"<img src=\"/images/mana/{file_safe_name}.{ext}\">"