Make WordPress Core

Ticket #20019: wp-ms-dotdash.patch

File wp-ms-dotdash.patch, 706 bytes (added by fo0bar, 13 years ago)

Patch to allow '.' and '-' in blog names, wpmu_validate_blog_signup()

  • wp-includes/ms-functions.php

     
    561561        if ( empty( $blogname ) )
    562562                $errors->add('blogname', __('Please enter a site name'));
    563563
    564         if ( preg_match( '/[^a-z0-9]+/', $blogname ) )
    565                 $errors->add('blogname', __('Only lowercase letters and numbers allowed'));
     564        if ( preg_match( '/[^a-z0-9\.\-]+/', $blogname ) )
     565                $errors->add('blogname', __('Only lowercase letters, numbers, dash and period allowed'));
    566566
    567567        if ( in_array( $blogname, $illegal_names ) == true )
    568568                $errors->add('blogname',  __('That name is not allowed'));