Use encode URI component for webhook

This commit is contained in:
Vortrex
2022-09-24 06:14:45 -05:00
parent c9cf80e34c
commit 64a08ccd37

View File

@@ -184,7 +184,7 @@ function triggerDiscordWebHook(messageString, serverId = getServerId(), type = A
}
let tempURL = getGlobalConfig().discord.webhook.webhookBaseURL;
tempURL = tempURL.replace("{0}", encodeURI(messageString));
tempURL = tempURL.replace("{0}", encodeURIComponent(messageString));
tempURL = tempURL.replace("{1}", serverId);
tempURL = tempURL.replace("{2}", type);
tempURL = tempURL.replace("{3}", getGlobalConfig().discord.webhook.pass);
@@ -211,7 +211,7 @@ function triggerClanDiscordWebHook(clanIndex, messageString) {
let webhookURL = getClanData(clanIndex).discordWebhookURL;
let tempURL = getGlobalConfig().discord.webhook.webhookBaseURL;
tempURL = tempURL.replace("{0}", encodeURI(messageString));
tempURL = tempURL.replace("{0}", encodeURIComponent(messageString));
tempURL = tempURL.replace("{1}", serverId);
tempURL = tempURL.replace("{2}", type);
tempURL = tempURL.replace("{3}", getGlobalConfig().discord.webhook.pass);