From: sebastien Date: Tue, 15 Oct 2019 13:02:34 +0000 (+0200) Subject: [BUGFIX] Replace \r by \r\n in email link for windows thunderbird compatibility X-Git-Tag: 4.0.0~15 X-Git-Url: https://git.p6c8.net/jirafeau.git/commitdiff_plain/08efa741a5984f3105e4c847d644522ed92d319c?ds=sidebyside [BUGFIX] Replace \r by \r\n in email link for windows thunderbird compatibility --- diff --git a/lib/functions.js.php b/lib/functions.js.php index 241a8e4..845da82 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -145,11 +145,11 @@ function show_link (reference, delete_code, crypt_key, date) // Email link var filename = document.getElementById('file_select').files[0].name; - var b = encodeURIComponent(" \"" + filename + "\":") + "%0D"; - b += encodeURIComponent(web_root + download_link_href) + "%0D"; + var b = encodeURIComponent(" \"" + filename + "\":") + "%0D" + "%0A"; + b += encodeURIComponent(web_root + download_link_href) + "%0D" + "%0A"; if (false == isEmpty(date)) { - b += "%0D" + encodeURIComponent(": " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D"; + b += "%0D" + "%0A" + encodeURIComponent(": " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D" + "%0A"; document.getElementById('upload_link_email').href = "mailto:?body=" + b + "&subject=" + encodeURIComponent(filename); }