def METHOD_NAME(txt):
    """
    Replace ESC (ASCII 27/Oct 33) to prevent unsafe strings
    from writing their own terminal manipulation commands
    """
    if isinstance(txt, str):
        return txt.replace("\033", "?")
    else:
        return txt