From e505a9a6ac1f90fe94571e0ebcce1690d2ddab9d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 23 May 2014 19:07:39 -0400 Subject: [PATCH] changed order of cleanup --- src/topics/tags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/topics/tags.js b/src/topics/tags.js index 63e67eddd4..9326f6fddb 100644 --- a/src/topics/tags.js +++ b/src/topics/tags.js @@ -32,12 +32,12 @@ module.exports = function(Topics) { function cleanUpTag(tag) { tag = tag.trim().toLowerCase(); + tag = tag.replace(/[\.,\/#!$%\^&\*;:{}=_`<>'"~()?\|]/g, ''); + tag = tag.substr(0, meta.config.maximumTagLength || 15); var matches = tag.match(/^-*(.+?)-*$/); if (matches && matches.length > 1) { tag = matches[1]; } - tag = tag.replace(/[\.,\/#!$%\^&\*;:{}=_`<>'"~()?\|]/g, ''); - tag = tag.substr(0, meta.config.maximumTagLength || 15); return tag; }