mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #11761, don't escape topic title twice
if a reply is being edited topicData.title is already escaped
This commit is contained in:
@@ -112,7 +112,7 @@ module.exports = function (Posts) {
|
|||||||
return {
|
return {
|
||||||
tid: tid,
|
tid: tid,
|
||||||
cid: topicData.cid,
|
cid: topicData.cid,
|
||||||
title: validator.escape(String(topicData.title)),
|
title: topicData.title,
|
||||||
isMainPost: false,
|
isMainPost: false,
|
||||||
renamed: false,
|
renamed: false,
|
||||||
tagsupdated: false,
|
tagsupdated: false,
|
||||||
|
|||||||
@@ -209,8 +209,7 @@ module.exports = function (Topics) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function onNewPost(postData, data) {
|
async function onNewPost(postData, data) {
|
||||||
const { tid } = postData;
|
const { tid, uid } = postData;
|
||||||
const { uid } = postData;
|
|
||||||
await Topics.markCategoryUnreadForAll(tid);
|
await Topics.markCategoryUnreadForAll(tid);
|
||||||
await Topics.markAsRead([tid], uid);
|
await Topics.markAsRead([tid], uid);
|
||||||
const [
|
const [
|
||||||
|
|||||||
Reference in New Issue
Block a user