def EscapeDelimiters(s):
    """
    Changes ``;`` into ``\\`` and ``|`` into ``\\|`` in the input string.

    :param string `s`: the string to be analyzed.

    :note: This is an internal functions which is used for saving perspectives.
    """
    result = s.replace(';', '\\')
    result = result.replace('|', '|\\')
    return result
