def unescape_new_line(escaped):
 return ESCAPE_CHAR.join((u'\n'.join(u'\r'.join(p.split((ESCAPE_CHAR + u'r'))).split((ESCAPE_CHAR + u'n'))) for p in escaped.split((ESCAPE_CHAR + ESCAPE_CHAR))))

def unescape_new_line ( escaped ) : return ESCAPE_CHAR . join ( ( u'\n' . join ( u'\r' . join ( p . split ( ( ESCAPE_CHAR + u'r' ) ) ) . split ( ( ESCAPE_CHAR + u'n' ) ) ) for p in escaped . split ( ( ESCAPE_CHAR + ESCAPE_CHAR ) ) ) )
replaces escaped characters by unescaped characters .