def escape_characters(markdown):
    """Takes some markdown and replaces escaped characters with the substition
    character. This is returned along with a list of escaped characters.

    You cannot escape line breaks - the backslash will be removed but not the
    line break.

    :param str markdown: The string to break up.
    :rtype: ``str``, ``list``"""

    characters = []
    while "\\" in markdown:
        loc = markdown.find("\\")
        if loc != len(markdown) - 1:
            character = markdown[loc + 1]
            if character != "\n":
                characters.append(character)
                markdown = markdown[:loc] + "\x1A" + markdown[loc + 2:]
            else:
                markdown = markdown[:loc] + markdown[loc + 1:]
        else:
            break
    return markdown, characters