username to userslug change

This commit is contained in:
Baris Usakli
2013-06-24 14:33:53 -04:00
parent ad11be657e
commit d3a190d74e
20 changed files with 148 additions and 88 deletions

View File

@@ -70,8 +70,8 @@
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîıòóöôùúüûñçş·/_,:;";
var to = "aaaaeeeeiiiiioooouuuuncs------";
var from = "àáäâèéëêìíïîıòóöôùúüûñçşğ·/_,:;";
var to = "aaaaeeeeiiiiioooouuuuncsg------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}