def METHOD_NAME(text, sanitize_quotes=False):
    text = text.replace('&', '&amp;')
    text = text.replace('<', '&lt;')
    text = text.replace('>', '&gt;')
    if sanitize_quotes:
        text = text.replace('"', '&quot;')
    return text