How do I get a URL parameter to be correctly URL encoded?

When including a merge field in an email link or a campaign link, it looks like they are not URL encoded. That is leading to issues when the included fields contain non-alphabet characters like a “+”.

For example, if I have an email like this:
I end up with a URL like this:
instead of this:

How can I get the merge fields to be correctly URL encoded?