postmark-java icon indicating copy to clipboard operation
postmark-java copied to clipboard

Prevent API parse error when names contain quotes

Open fibbers opened this issue 1 year ago • 3 comments

This way, it's possible to call message.setTo(Map.of(name, address)) without first having to escape the name.

This should fix #65.

Note:

  • If there are other characters that might also need escaping, I can add those as well. Also, if there's another way of escaping than this simple .replace call, I can change it.
  • I didn't add an integration test, but let me know if that's desired.
  • I saw in the other tests inside MessageTest that assertEquals are reversed: expected <-> actual. I didn't modify them to keep this PR focused, but just so you know.

fibbers avatar Oct 11 '24 12:10 fibbers

@ibalosh gently pinging you in case you missed some notifications 🙂

What do you think, are there any changes you can think of, or does it look ok?

fibbers avatar Oct 17 '24 10:10 fibbers

Hi @fibbers Unfortunatelly I no longer work on Postmark project, please check with Active Campaign engineering team.

ibalosh avatar Oct 17 '24 16:10 ibalosh

hi @fibbers, the team and I are figuring out what to do here as well as update the maintainer list. We'll follow up!

dandigangi avatar Oct 21 '24 14:10 dandigangi