Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#25134 closed defect (bug) (duplicate)

Multisite new site domain name: inconsistency with hyphens ms-functions.php vs site-new.php

Reported by: lkraav Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords:
Focuses: Cc:



if ( preg_match( '/[^a-z0-9]+/', $blogname ) )



if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )

Yes, I'd really like to have hyphens in my subsite domain names. Blaming all the way back to multisite import doesn't reveal any particular reasoning why hyphens are historically disallowed. Since hyphens are a normal part of the DNS system, I see no reason why they should be banned.

I would suggest matching also for "-" in ms-functions.php.

Change History (4)

#1 @SergeyBiryukov
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 3.0

Duplicate of #20019.

#2 @lkraav
8 years ago

Meh, tried hard finding "hyphen" with search.

Re ticket subjects, how was I supposed to search for that? Any search like "-" is basically nonsense.

#3 @SergeyBiryukov
8 years ago

I've remembered that we have a similar ticket slated for 3.7, so I searched for "Multisite inconsistency" and found #17397. It was not an exact duplicate, however there was a link to #20019 in the comments.

It could also be found by "wpmu_validate_blog_signup".

#4 @lkraav
8 years ago

True, searching for function name makes sense.

Note: See TracTickets for help on using tickets.