def sanitize_html(text):
    """Prevent parsing errors by converting <, >, & to their HTML codes."""
    return text\
        .replace('<', '&lt;')\
        .replace('>', '&gt;')\
        .replace('&', '&amp;')