From c839d1cbc0abde6944975ee71d6a6b5894b735d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 17 Nov 2017 08:10:25 -0500 Subject: [PATCH] closes #6080 closes #6078 --- public/language/en-GB/email.json | 2 ++ src/notifications.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/language/en-GB/email.json b/public/language/en-GB/email.json index a55f4f1f52..488af122bd 100644 --- a/public/language/en-GB/email.json +++ b/public/language/en-GB/email.json @@ -40,6 +40,8 @@ "notif.post.cta": "Click here to read the full topic", "notif.post.unsub.info": "This post notification was sent to you due to your subscription settings.", + "notif.cta": "Click here to go to forum", + "test.text1": "This is a test email to verify that the emailer is set up correctly for your NodeBB.", "unsub.cta": "Click here to alter those settings", diff --git a/src/notifications.js b/src/notifications.js index 193427e8aa..6a7940d50d 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -220,9 +220,9 @@ function pushToUids(uids, notification, callback) { async.eachLimit(uids, 3, function (uid, next) { emailer.send('notification', uid, { path: notification.path, - subject: '[' + (meta.config.title || 'NodeBB') + '] ' + notification.bodyShort, - intro: '[[notifications:new_notification_from, ' + meta.config.title + ']]', - body: notification.bodyLong || notification.bodyShort, + subject: '[[notifications:new_notification_from, ' + meta.config.title + ']]', + intro: utils.stripHTMLTags(notification.bodyShort), + body: utils.stripHTMLTags(notification.bodyLong || ''), showUnsubscribe: true, }, next); }, callback);