mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-23 12:50:56 +01:00
fix: #13889, custom emoji from Piefed
This commit is contained in:
@@ -60,7 +60,8 @@ module.exports = function (Posts) {
|
|||||||
tag.name = `${tag.name}:`;
|
tag.name = `${tag.name}:`;
|
||||||
}
|
}
|
||||||
|
|
||||||
postData.content = postData.content.replace(new RegExp(tag.name, 'g'), `<img class="not-responsive emoji" src="${tag.icon.url}" title="${tag.name}" />`);
|
const property = postData.sourceContent && !postData.content ? 'sourceContent' : 'content';
|
||||||
|
postData[property] = postData[property].replace(new RegExp(tag.name, 'g'), `<img class="not-responsive emoji" src="${tag.icon.url}" title="${tag.name}" />`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user