From 752a18a8c5f4b85584be521aa01104573306429a Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 15 Nov 2019 12:51:27 +0100 Subject: [PATCH] fix #3153 @0.5 --- js/libs/fluidbook/fluidbook.share.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/js/libs/fluidbook/fluidbook.share.js b/js/libs/fluidbook/fluidbook.share.js index 4bacb9ec..75673b30 100644 --- a/js/libs/fluidbook/fluidbook.share.js +++ b/js/libs/fluidbook/fluidbook.share.js @@ -267,7 +267,18 @@ FluidbookShare.prototype = { }, sendEmail: function (url, context) { - window.location = 'mailto:?subject=' + encodeURIComponent(this.getEmailSubject(url, context)) + '&body=' + encodeURIComponent(this.getEmailBody(url, context)); + var subject = encodeURIComponent(this.getEmailSubject(url, context)); + var body = encodeURIComponent(this.getEmailBody(url, context)); + + var mailtoParams = []; + if (subject !== '') { + mailtoParams.push('subject=' + subject); + } + if (body !== '') { + mailtoParams.push('body=' + body); + } + var mailto = 'mailto:?' + mailtoParams.join('&'); + window.location = mailto; this.fluidbook.stats.track(5); }, sendTwitter: function (url, context) { -- 2.39.5