mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
disallow underscore in slugs (#6133)
This commit is contained in:
@@ -336,8 +336,8 @@
|
||||
return String(str).replace(new RegExp('<(\\/)?(' + (pattern || '[^\\s>]+') + ')(\\s+[^<>]*?)?\\s*(\\/)?>', 'gi'), '');
|
||||
},
|
||||
|
||||
invalidUnicodeChars: XRegExp('[^\\p{L}\\s\\d\\-_]', 'g'),
|
||||
invalidLatinChars: /[^\w\s\d\-_]/g,
|
||||
invalidUnicodeChars: XRegExp('([^\\p{L}\\s\\d-]|_)', 'g'),
|
||||
invalidLatinChars: /([^\w\s\d-]|_)/g,
|
||||
trimRegex: /^\s+|\s+$/g,
|
||||
collapseWhitespace: /\s+/g,
|
||||
collapseDash: /-+/g,
|
||||
|
||||
Reference in New Issue
Block a user