diff --git a/app/assets/javascripts/locomotive/utils/core_ext.js b/app/assets/javascripts/locomotive/utils/core_ext.js index c3e112cd..bededa0c 100644 --- a/app/assets/javascripts/locomotive/utils/core_ext.js +++ b/app/assets/javascripts/locomotive/utils/core_ext.js @@ -18,9 +18,9 @@ String.prototype.slugify = function(sep) { if (typeof sep == 'undefined') sep = '_'; - var alphaNumRegexp = new RegExp('[^\w\\' + sep + ']', 'g'); + var alphaNumRegexp = new RegExp('[^\\w\\' + sep + ']', 'g'); var avoidDuplicateRegexp = new RegExp('[\\' + sep + ']{2,}', 'g'); - return this.replace(/\s/g, sep).replace(alphaNumRegexp, '').replace(avoidDuplicateRegexp, sep).toLowerCase() + return this.replace(/\s/g, sep).replace(alphaNumRegexp, '').replace(avoidDuplicateRegexp, sep).toLowerCase(); } window.addParameterToURL = function(key, value, context) { // code from http://stackoverflow.com/questions/486896/adding-a-parameter-to-the-url-with-javascript