Avatar

URL Encoding Email Notification Token Values

0

I'm trying to create an email notification template that will contain a link. The link will have token values in the query string. For example:

<a href="http://<domain>/?database={Database}&serialnumber={Serial number}&date={Date}&time={Time}&timezone={Timezone}">click me</a>

When the email gets sent, the anchor tag is converted to HTML. The problem is that the Timezone doesn't get URL Encoded properly. The resulting link looks like this:

http://<domain>/?database=<database_name>&serialnumber=<device_serial>&date=06/06/16&time=02:09:00%20PM&timezone=(UTC-07:00)%20Mountain%20Time%20(US%20&%20Canada)

The ampersand between "US" and "Canada" isn't encoded and causing problems. Is there a way I can ensure the values are URL encoded? 

Mike Boddy

Please sign in to leave a comment.