mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-27 00:51:16 +01:00
fix: sanitize post remote post content regardless
This commit is contained in:
@@ -63,6 +63,8 @@ module.exports = function (Posts) {
|
|||||||
|
|
||||||
if (!activitypub.helpers.isUri(postData.pid) || postData.hasOwnProperty('sourceContent')) {
|
if (!activitypub.helpers.isUri(postData.pid) || postData.hasOwnProperty('sourceContent')) {
|
||||||
({ postData } = await plugins.hooks.fire('filter:parse.post', { postData }));
|
({ postData } = await plugins.hooks.fire('filter:parse.post', { postData }));
|
||||||
|
} else {
|
||||||
|
postData.content = await Posts.sanitize(postData.content);
|
||||||
}
|
}
|
||||||
postData.content = translator.escape(postData.content);
|
postData.content = translator.escape(postData.content);
|
||||||
if (postData.pid) {
|
if (postData.pid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user