mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
stripping paragraph tags from post summaries in an effort to collapse it all into one paragraph block.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user