mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-04 19:41:16 +01:00
closes #1947
This commit is contained in:
@@ -13,7 +13,7 @@ tagsController.getTag = function(req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (!tids || !tids.length) {
|
||||
if (Array.isArray(tids) && !tids.length) {
|
||||
topics.deleteTag(tag);
|
||||
return res.render('tag', {topics: [], tag:tag});
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ module.exports = function(Topics) {
|
||||
return '';
|
||||
}
|
||||
tag = tag.trim().toLowerCase();
|
||||
tag = tag.replace(/&/g, '&');
|
||||
tag = tag.replace(/[,\/#!$%\^\*;:{}=_`<>'"~()?\|]/g, '');
|
||||
tag = tag.substr(0, meta.config.maximumTagLength || 15);
|
||||
var matches = tag.match(/^[.-]*(.+?)[.-]*$/);
|
||||
|
||||
Reference in New Issue
Block a user