We use this script to pull information from the users into the link URL. For example https://domain.com/xxx?login={{contact.email}}. The URL which was created was https://domain.com/xxx?login=name@domain.com. The link has now changed to https://domain.com/xxx?login=name%40domain.com where the “@” sign has changed to the html equivalent of “%40”.
We have added some code to deal with this where we control the web site, but we use this also for 3rd party web sites. It will help if hubspot can revert the URL back to “@” when using the script {{contact.email}} rather than the html equivalent of “%40”, else these links will not work.
Mark de Lange
It looks like the email is being URL encoded during the link wrapping process for email click tracking, not when the HubL token is actually evaluated. The @ symbol is an RFC reserved character, so it has to be percent-encoded when we produce the URI as a part of the link tracking. This is the proper way to handle @ symbols in URIs, so it's not something we're planning on changing. I'd recommend updating your script(s) to handle the %40-to-@ translation.
Just to make sure that we're on the same page, this token is inside the href attribute of an image? Can you send me a link to the email in HubSpot so that I can take a closer look?
You can try {{ contact.email|replace('%40', '@') }} or {{ contact.email|safe }}. Considering you haven’t really explained where does this happen and how does your script look like, I can’t help you more as I can’t test it in our environment.
Thanks Daniel,
The link is used in an email and hyperlined with an image, a bit like a call to action.
Neither of your suggestions changed tghe “%40” with a “@”.
Regards,
Mark