I want to disallow the use of spaces and all symbols except "_".

  • Are you looking for a module that allows that, or how to do that within a custom module?
    – apaderno
    May 7, 2011 at 19:49
  • Most importantly, for what do you want to disallow the use of such characters?
    – apaderno
    May 7, 2011 at 20:08
  • I want to be be able to generate a seo friendly URL with there user name.
    – J-Fiz
    May 8, 2011 at 1:10

1 Answer 1


Based on what you said in your comment, you should just use Pathauto. Pathauto allows you to remove special characters from user/node/taxonomy URLs; if someone's username is 'hey$3#@", you could make their user profile URL http://yourdomain.com/user/hey3.

  • I agree; generating a SEO friendly URL doesn't mean to limit the characters used for the usernames. To notice that in case of conflict, Pathauto will add a character to make the URL unique.
    – apaderno
    May 8, 2011 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.