feat: allow % in tags, #10135

This commit is contained in:
Barış Soner Uşaklı
2022-01-10 16:44:16 -05:00
parent 42caef7fa7
commit a75a043b61
4 changed files with 4 additions and 2 deletions

View File

@@ -334,7 +334,7 @@
tag = tag.trim().toLowerCase();
// see https://github.com/NodeBB/NodeBB/issues/4378
tag = tag.replace(/\u202E/gi, '');
tag = tag.replace(/[,/#!$%^*;:{}=_`<>'"~()?|]/g, '');
tag = tag.replace(/[,/#!$^*;:{}=_`<>'"~()?|]/g, '');
tag = tag.substr(0, maxLength || 15).trim();
const matches = tag.match(/^[.-]*(.+?)[.-]*$/);
if (matches && matches.length > 1) {