From 5a031d01e6da53acc165df013498d80695cbdcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 6 Jan 2026 11:34:43 -0500 Subject: [PATCH] fix: closes #13872, use translator.compile for notification text so commas don't cause issues --- src/socket.io/helpers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js index 5def5138d4..194602f1b3 100644 --- a/src/socket.io/helpers.js +++ b/src/socket.io/helpers.js @@ -13,6 +13,7 @@ const notifications = require('../notifications'); const plugins = require('../plugins'); const utils = require('../utils'); const batch = require('../batch'); +const translator = require('../translator'); const SocketHelpers = module.exports; @@ -113,10 +114,11 @@ SocketHelpers.sendNotificationToPostOwner = async function (pid, fromuid, comman const title = utils.decodeHTMLEntities(topicTitle); const titleEscaped = title.replace(/%/g, '%').replace(/,/g, ','); + const bodyShort = translator.compile(notification, userData.displayname || userData.name, titleEscaped); const notifObj = await notifications.create({ type: command, - bodyShort: `[[${notification}, ${userData.displayname || userData.name}, ${titleEscaped}]]`, + bodyShort: bodyShort, bodyLong: postObj.content, pid: pid, tid: postData.tid,