Add tests
Fix escaping bug for empty strings