From eb1b48092d29995455ae1701bdb8e89dc23807e0 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 10 Jun 2014 14:02:24 -0400 Subject: [PATCH] closes #1666 --- src/topics/tags.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/topics/tags.js b/src/topics/tags.js index ae53593deb..8e4b85bddf 100644 --- a/src/topics/tags.js +++ b/src/topics/tags.js @@ -35,6 +35,9 @@ module.exports = function(Topics) { }; function cleanUpTag(tag) { + if (typeof tag !== 'string' || !tag.length ) { + return ''; + } tag = tag.trim().toLowerCase(); tag = tag.replace(/[,\/#!$%\^&\*;:{}=_`<>'"~()?\|]/g, ''); tag = tag.substr(0, meta.config.maximumTagLength || 15);