This commit is contained in:
barisusakli
2014-08-05 13:38:46 -04:00
parent 1e6eaffd43
commit 95979d9d97
2 changed files with 1 additions and 2 deletions

View File

@@ -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});
}

View File

@@ -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(/^[.-]*(.+?)[.-]*$/);