def vast_escape_str(val: str):
    """
    Strings need to be passed to VAST in double quotes. In consequence, we must
    escape double quotes before querying VAST.
    """

    val = val.replace("\\", "\\\\")
    return val.replace('"', '\\"')