def fix(string):
    """
    Escapes several entities form the passed in string to ensure proper DOT
    output.
    """
    string = string.replace('\\', '\\\\')
    string = string.replace('"', '\\"')
    return string