[wp-trac] [WordPress Trac] #20019: wpmu_validate_blog_signup(): Allow '.' and '-' in blog names
WordPress Trac
noreply at wordpress.org
Thu Jan 30 13:28:02 UTC 2014
#20019: wpmu_validate_blog_signup(): Allow '.' and '-' in blog names
--------------------------------------+-----------------------------
Reporter: fo0bar | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Login and Registration | Version: 3.0
Severity: normal | Resolution:
Keywords: dev-feedback needs-patch | Focuses: multisite
--------------------------------------+-----------------------------
Comment (by drewnorthup):
Replying to [comment:15 tlovett1]:
> I don't understand why wpmu_validate_blog_signup() doesn't allow "-" in
blogname by default. wp-admin/network/site-new.php runs the domain against
the following regex `|^([a-zA-Z0-9-])+$|`
>
> Perhaps blogname is different than domain name? Can anyone clear this up
for me.
They are only 100% the same in non-network installations. (Of the normal
kind anyway, advanced users can do all sorts of crazy things.) In network
installations blogname can be related to either a DNS subdomain or a
portion of a URI path. In the case of "folder" based network setups
there's really no reason not to allow underscores.
In fact, I'd be a bit more bold than just allowing underscores (in folders
/ URI paths) and suggest that we should provide the option to use full
UTF-8 designators (after providing for a warning to the user containing
information about IDN and internationalized filesystems).(1) Note, I said
the "option" to do so. In other words, make the filter a configurable
option (I'd prefer doing so in wp-config.php, as that's potentially faster
than putting it in the DB) with a safe default.
(1) Given that just about every "current" filesystem on every "current" OS
release supports internationalized character sets the warning needn't be
anything particularly dramatic.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20019#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list