def html_escape(text):
    """Escape text so that it will be displayed safely within HTML"""
    text = text.replace('&', '&amp;')
    text = text.replace('<', '&lt;')
    text = text.replace('>', '&gt;')
    return text
