String.replace() only replaces the first instance
Merge pull request #83 from dimagi/newlines

fix issue with newlines