Fix: correctly escape \r and \n symbols