Fix '&amp' encoding in tracked URLs before saving in the DB. Closes #844.

This commit is contained in:
Kailash Nadh 2022-07-11 23:18:08 +05:30
parent 9107edf867
commit c84837f8cb

View file

@ -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 // trackLink register a URL and return its UUID to be used in message templates
// for tracking links. // for tracking links.
func (m *Manager) trackLink(url, campUUID, subUUID string) string { func (m *Manager) trackLink(url, campUUID, subUUID string) string {
url = strings.ReplaceAll(url, "&", "&")
m.linksMut.RLock() m.linksMut.RLock()
if uu, ok := m.links[url]; ok { if uu, ok := m.links[url]; ok {
m.linksMut.RUnlock() m.linksMut.RUnlock()