I have some input: '123Joe's amazing login'
What I'm looking to do with that input is remind the user that is registering to the site that he needs to make his username url friendly
So server side I would like to have some string match or comparison to see if it is indeed url friendly, and if it is okay we are golden, if not I would like to urlfy it and send it back to the user saying something like: "Hey this name: 123joes-amazing-login is better"
I'm not too sure where to start looking, any suggestions?
edit:
other io could be: "this is awesome" to "this_is_awesome" etc... just need to make sure it's url friendly!
edit 2: I wound up using this:
username = str(request.form['username'])
username = urllib.quote(username, '')
if '%' in username:
This covers the scope of the handling i.e. users can still underscore and dash.
Thanks for all the help.