From 54130e6df9ac945ca872fecdde3f0592072f6ecb Mon Sep 17 00:00:00 2001 From: Rafael Kr Date: Tue, 1 Mar 2016 10:47:09 +0100 Subject: [PATCH] Use of safer function qs.unescape I didn't know about that function, thank you. I've updated the code. --- src/telegram.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telegram.js b/src/telegram.js index 2f7f1b2..47c06f7 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -277,7 +277,7 @@ TelegramBot.prototype._formatSendData = function (type, data) { formData[type] = { value: data, options: { - filename: decodeURIComponent(fileName), + filename: qs.unescape(fileName), contentType: mime.lookup(fileName) } };