function clean($raw) {
// Replace spaces with dashes] & convert to lower case
$raw = strtolower(str_replace(" ", "-", $raw));
return preg_replace("/[^a-z-]/", "", $raw);
}

Change last line to
return preg_replace("/[^a-z0-9-]/","",$raw);
to fix.

Comments

kardave’s picture

Correct, numbers should be allowed!

jvieille’s picture

Priority: Normal » Critical
Status: Active » Reviewed & tested by the community

Critical, as subdomain is unusable in many standard situations
Solves http://drupal.org/node/1589992

Needs to be committed ASAP
Thanks

honza pobořil’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Active

"Reviewed & tested by the community" means there is reviewed and tested patch ready to be commited.

honza pobořil’s picture

Priority: Critical » Major
  • Critical is used to designate broken functionality that makes the project unusable. "Critical" should be reserved for the most problematic and important issues. Abuse of the Critical field will likely get your issue ignored by a developer.
  • Major is used for issues which have significant repercussions, but do not render the whole system unusable.