From dd175ada671a893c46a448bb50078c2d0c0a343f Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 13 Apr 2015 13:07:20 -0400 Subject: [PATCH] closes #3003 --- src/controllers/search.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/search.js b/src/controllers/search.js index b1b1141a79..6637acbbc3 100644 --- a/src/controllers/search.js +++ b/src/controllers/search.js @@ -22,6 +22,10 @@ searchController.search = function(req, res, next) { return next(err); } + categories = categories.filter(function(category) { + return category && !category.link; + }); + req.params.term = validator.escape(req.params.term); var page = Math.max(1, parseInt(req.query.page, 10)) || 1; if (req.query.categories && !Array.isArray(req.query.categories)) {