def EscapeDelimiters(s):
    """
    EscapeDelimiters() changes "" into "\" and "|" into "\|"
    in the input string.  This is an internal functions which is
    used for saving perspectives.
    """
    
    result = s.replace(";", "\\")
    result = result.replace("|", "|\\")
    
    return result