v1.18.x
barisusakli 11 years ago
parent 1e6eaffd43
commit 95979d9d97

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

Loading…
Cancel
Save