mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-09 05:33:05 +02:00
closes #1666
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user