From c84837f8cb4504cdd7ef3da6d0b67e7f8076515a Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Mon, 11 Jul 2022 23:18:08 +0530 Subject: [PATCH] Fix '&' encoding in tracked URLs before saving in the DB. Closes #844. --- internal/manager/manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/manager/manager.go b/internal/manager/manager.go index 3900459..db13243 100644 --- a/internal/manager/manager.go +++ b/internal/manager/manager.go @@ -686,6 +686,8 @@ func (m *Manager) exhaustCampaign(c *models.Campaign, status string) (*models.Ca // trackLink register a URL and return its UUID to be used in message templates // for tracking links. func (m *Manager) trackLink(url, campUUID, subUUID string) string { + url = strings.ReplaceAll(url, "&", "&") + m.linksMut.RLock() if uu, ok := m.links[url]; ok { m.linksMut.RUnlock()