added unit tests for escape chars and fixed the code so it passes - TDD FTW