stripping paragraph tags from post summaries in an effort to collapse it all into one paragraph block.

v1.18.x
Julian Lam 11 years ago
parent a7c5a5e819
commit b9aa0d2121

@ -14,14 +14,10 @@ module.exports = function(Categories) {
} }
db.getSortedSetRevRange('categories:recent_posts:cid:' + cid, 0, count - 1, function(err, pids) { db.getSortedSetRevRange('categories:recent_posts:cid:' + cid, 0, count - 1, function(err, pids) {
if (err) { if (err || !pids || !pids.length) {
return callback(err, []); return callback(err, []);
} }
if (!pids || !pids.length) {
return callback(null, []);
}
posts.getPostSummaryByPids(pids, true, callback); posts.getPostSummaryByPids(pids, true, callback);
}); });
}; };

@ -324,7 +324,7 @@ var db = require('./database'),
if(stripTags) { if(stripTags) {
var s = S(content); 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 { } else {
post.content = content; post.content = content;
} }

Loading…
Cancel
Save