]> git.p6c8.net - jirafeau_project.git/commitdiff
[BUGFIX] Replace \r by \r\n in email link for windows thunderbird compatibility
authorsebastien <sebastien@nobelconnexion.fr>
Tue, 15 Oct 2019 13:02:34 +0000 (15:02 +0200)
committerJerome Jutteau <jerome@jutteau.fr>
Mon, 21 Oct 2019 19:36:13 +0000 (21:36 +0200)
lib/functions.js.php

index 241a8e4c86ec2b985e414ad747507d5f32e282b7..845da827ac7adb91c5199e3b47977918ba903922 100644 (file)
@@ -145,11 +145,11 @@ function show_link (reference, delete_code, crypt_key, date)
 
     // Email link
     var filename = document.getElementById('file_select').files[0].name;
 
     // Email link
     var filename = document.getElementById('file_select').files[0].name;
-    var b = encodeURIComponent("<?php echo t("DL"); ?> \"" + filename + "\":") + "%0D";
-    b += encodeURIComponent(web_root + download_link_href) + "%0D";
+    var b = encodeURIComponent("<?php echo t("DL"); ?> \"" + filename + "\":") + "%0D" + "%0A";
+    b += encodeURIComponent(web_root + download_link_href) + "%0D" + "%0A";
     if (false == isEmpty(date))
     {
     if (false == isEmpty(date))
     {
-        b += "%0D" + encodeURIComponent("<?php echo t("VALID_UNTIL"); ?>: " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D";
+        b += "%0D" + "%0A" + encodeURIComponent("<?php echo t("VALID_UNTIL"); ?>: " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D" + "%0A";
         document.getElementById('upload_link_email').href = "mailto:?body=" + b + "&subject=" + encodeURIComponent(filename);
     }
 
         document.getElementById('upload_link_email').href = "mailto:?body=" + b + "&subject=" + encodeURIComponent(filename);
     }
 

patrick-canterino.de