Skip to content

Node.js based forum software built for the modern web

another validator.escape fix

barisusaklic8f270ec679e
diff --git a/src/posts/summary.js b/src/posts/summary.js
index 32651b67c1..a245a41b29 100644
--- a/src/posts/summary.js
+++ b/src/posts/summary.js
@@ -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);
}