Create a permalink with Javascript
- by Jon Romero
I have a textbox where a user puts a string like this:
"hello world! I think that __i__ am awesome (yes I am!)"
I need to create a correct url like this:
hello-world-i-think-that-i-am-awesome-yes-i-am
How can be done using reg expressions?
Also, is it possible to do it with Greek (for example)?
"Ge?a s?? ??sµe"
turns to
geia-sou-kosme
In other programming languages (python/ruby) I am using a translation array. Should I do the same here?