added turkish characters to utils.slugify

v1.18.x
Baris Usakli 12 years ago
parent 3ef32ba7fb
commit ad11be657e

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

@ -145,6 +145,10 @@ var utils = require('./../public/src/utils.js'),
var gravatar = User.createGravatarURLFromEmail(email);
var userSlug = utils.slugify(username);
console.log(userSlug);
RDB.hmset('user:'+uid, {
'username' : username,
'fullname': '',

Loading…
Cancel
Save