def sanitize(text): """Gets rid of < and > and & and, for good measure, :""" return html.escape(text, quote=True).replace(':', ':')