Skip to content

Node.js based forum software built for the modern web

strip tags in recent replies

Baris Usaklie69928d62442
diff --git a/src/posts.js b/src/posts.js
index 583ab16236..febaa8c16a 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -65,6 +65,10 @@ var RDB = require('./redis.js'),
Posts.addUserInfoToPost(postData, function() {
topics.getTopicField(postData.tid, 'slug', function(topicSlug) {
+
+ if(postData.content)
+ postData.content = utils.strip_tags(postTools.markdownToHTML(postData.content));
+
postData.topicSlug = topicSlug;
returnData.push(postData);
callback(null);