mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-24 13:20:56 +01:00
changed order of cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user