def escapeAttr(sText):
    """
    Escapes special character to HTML-safe sequences.
    """
    sText = sText.replace('&', '&amp;')
    sText = sText.replace('<', '&lt;')
    sText = sText.replace('>', '&gt;')
    return sText.replace('"', '&quot;')