Skip to content

Node.js based forum software built for the modern web

closes #6080 closes #6078

Barış Soner Uşaklıc839d1cbc0ab
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);