]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/static/js/view_mail.js
Attachments now download with the appropriate filename.
[citadel.git] / webcit-ng / static / js / view_mail.js
index 0c7052cb7617da8d1fe7cbd2930b5b002169233c..0b6cf8ce4a87b23c05b43a81d1ec1962c23238ae 100644 (file)
@@ -217,7 +217,7 @@ function mail_render_one(msgnum, msg, target_div, include_controls) {
                                        }
                                        display_attachments += 1;
                                        outmsg += "<li>"
-                                               + "<a href=\"/ctdl/r/" + escapeHTMLURI(current_room) + "/" + msgnum + "/" + msg.part[r].partnum + "\">"
+                                               + "<a href=\"/ctdl/r/" + escapeHTMLURI(current_room) + "/" + msgnum + "/" + msg.part[r].partnum + "/" + escapeHTMLURI(msg.part[r].filename) + "\">"
                                                + "<i class=\"fa fa-paperclip\"></i>&nbsp;" + msg.part[r].partnum + ": " + msg.part[r].filename
                                                + " (" + msg.part[r].len + " " + _("bytes") + ")"
                                                + "</a>"