Builtin Zone-MTA upgraded
Bug fix - URLs in campaign would not work if they contained non-ASCII character
This commit is contained in:
Tomas Bures 2020-06-17 17:24:38 +02:00
parent 65d3aed29d
commit 82251d1cb9
6 changed files with 217 additions and 43 deletions

View file

@ -173,7 +173,7 @@ async function updateLinks(source, tagLanguage, mergeTags, campaign, list, subsc
const urls = new Map(); // url -> {id, cid} (as returned by add)
for (const url of urlsToBeReplaced) {
// url might include variables, need to rewrite those just as we do with message content
const expanedUrl = tools.formatCampaignTemplate(url, tagLanguage, mergeTags, false, campaign, list, subscription);
const expanedUrl = encodeURI(tools.formatCampaignTemplate(url, tagLanguage, mergeTags, false, campaign, list, subscription));
const link = await addOrGet(campaign.id, expanedUrl);
urls.set(url, link);
}