Skip to content

Node.js based forum software built for the modern web

allow underscores in slugs

Julian Lam5a88a5ca6058
diff --git a/public/src/utils.js b/public/src/utils.js
index c3e0ffbc4a..8f74cb1344 100644
--- a/public/src/utils.js
+++ b/public/src/utils.js
@@ -95,7 +95,7 @@
//http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
slugify: function(str) {
- var invalidChars = XRegExp('[^\\p{L} 0-9\-]', 'g');
+ var invalidChars = XRegExp('[^\\p{L} 0-9\-_]', 'g');
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();