def XMLescape(txt):
    """Returns provided string with symbols & < > " replaced by their respective XML entities."""
    return txt.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;'
        ).replace('"', '&quot;').replace('\x0c', '').replace('\x1b', '')
