From b9aa0d21212938173e3fda275082b5d441ae4c51 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 4 Apr 2014 09:21:17 -0400 Subject: [PATCH] stripping paragraph tags from post summaries in an effort to collapse it all into one paragraph block. --- src/categories/recentreplies.js | 6 +----- src/posts.js | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index 825cdc601d..8f4b571e9e 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -14,14 +14,10 @@ module.exports = function(Categories) { } db.getSortedSetRevRange('categories:recent_posts:cid:' + cid, 0, count - 1, function(err, pids) { - if (err) { + if (err || !pids || !pids.length) { return callback(err, []); } - if (!pids || !pids.length) { - return callback(null, []); - } - posts.getPostSummaryByPids(pids, true, callback); }); }; diff --git a/src/posts.js b/src/posts.js index 24a81a7e39..08a34dc403 100644 --- a/src/posts.js +++ b/src/posts.js @@ -324,7 +324,7 @@ var db = require('./database'), if(stripTags) { var s = S(content); - post.content = s.stripTags.apply(s, utils.getTagsExcept(['img', 'i', 'p'])).s; + post.content = s.stripTags.apply(s, utils.getTagsExcept(['img', 'i'])).s; } else { post.content = content; }