Escape newline characters when dispatching data