How to hace nice URLs?
-
@darkpollo looks like we used replace accented characters with regular ones but it was changed to support unicode slugs long time ago, https://github.com/NodeBB/NodeBB/commit/53caa5e422b986aa6e4a6e7350267777ad5741a5, not sure if reverting back would break stuff @julian
-
@baris Thanks.
It seems that when that was changed, we lost that ability. Maybe just updating slugify could work?
We are using a 11 years old slugify version...Or just add back this:
// remove accents, swap ñ for n, etc 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)); }
Also I have been reading the forum and I found many post about this, most are from non-English languages.
I think this is something should be addressed and fixed but of course we do not want to break anything. -
You can open an issue on our github, it is likely a breaking change because it would alter old slugs, for example if a user had a userslug of
àáäâ
i would becomeaaaa
after this change, same for categories, groups. So it isn't a simple change of just updating the slugify function. -
-
I made some search and it seems this is not new:
Turkish URL Transliteration
Hi, Characters in Turkish language appear broken in URLs. Characters like I, Ş, Ö, Ç break the URL structure. Is there a solution to this?
NodeBB Community (community.nodebb.org)
Cyrillic url transliteration
Hi. Sorry for my bad english. I installed Nodebb, I really liked the forum. I think Nodebb is the best forum in the world. But 1 big drawback upset me. I did...
NodeBB Community (community.nodebb.org)
Remove accents from URL
Hi all, Merry Christmas to all I need help with removing accents from urls, I am new in node so pls help me where to find that part in nodebb (creating new c...
NodeBB Community (community.nodebb.org)
-
I think this may be similar to what Xenforo had some dealings with? They have an option in the ACP to romanize URL's.