def unescape_newlines(s):
    """ Unescape newlines in a text string

    :param s: (:code:`str`) String to search and replace against
    :returns: (:code:`str`) String with unescaped newlines
    """
    if type(s) == bytes:
        s = s.decode('utf-8')
    return s.replace('\\n', '\n')
