another validator.escape fix

This commit is contained in:
barisusakli
2016-08-27 02:01:37 +03:00
parent 8a847df4fd
commit c8f270ec67

View File

@@ -86,7 +86,7 @@ module.exports = function(Posts) {
if (options.stripTags) {
post.content = stripTags(post.content);
}
post.content = post.content ? validator.escape(post.content) : post.content;
post.content = post.content ? validator.escape(String(post.content)) : post.content;
return next(null, post);
}