def html_encode(text):
    """
    Encode ``&``, ``<`` and ``>`` entities in ``text`` that will
    be used in or as HTML.
    """
    return text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
