mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
closes #3121 -- if for any reason postData.content is not a string, make sure it is a string before it hits plugins.
This commit is contained in:
@@ -15,6 +15,11 @@ module.exports = function(Posts) {
|
|||||||
return callback(null, postData);
|
return callback(null, postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Casting post content into a string, just in case
|
||||||
|
if (typeof postData.content !== 'string') {
|
||||||
|
postData.content = postData.content.toString();
|
||||||
|
}
|
||||||
|
|
||||||
plugins.fireHook('filter:parse.post', {postData: postData}, function(err, data) {
|
plugins.fireHook('filter:parse.post', {postData: postData}, function(err, data) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user