Skip to content

Prevent API parse error when names contain quotes #66

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fibbers
Copy link

@fibbers fibbers commented Oct 11, 2024

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.

This way, it's possible to call `message.setTo(Map.of(name, address))`
without first having to escape the `name`.
@fibbers
Copy link
Author

fibbers commented Oct 17, 2024

@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?

@ibalosh
Copy link
Contributor

ibalosh commented Oct 17, 2024

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

@dandigangi
Copy link

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deliverMessage throws InvalidMessageException with names that have quotes in it
3 participants