escape input tag

v1.18.x
barisusakli 11 years ago
parent c32fdabc43
commit 7652f2bf39

@ -3,11 +3,12 @@
var tagsController = {},
async = require('async'),
nconf = require('nconf'),
validator = require('validator'),
meta = require('../meta'),
topics = require('../topics');
tagsController.getTag = function(req, res, next) {
var tag = req.params.tag;
var tag = validator.escape(req.params.tag);
var uid = req.user ? req.user.uid : 0;
var end = (parseInt(meta.config.topicsPerList, 10) || 20) - 1;
topics.getTagTids(tag, 0, end, function(err, tids) {

Loading…
Cancel
Save