Make WordPress Core

Changeset 23686


Ignore:
Timestamp:
03/13/2013 04:00:38 PM (11 years ago)
Author:
westi
Message:

Multisite: Ensure that get_blogaddress_by_name does not mangle blognames with leading digits.

Correctly specify the backreference in the regular expression so that it can not become ambiguous when there is a leading digit on the blogname.

Fixes #23689 props dllh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-blogs.php

    r23458 r23686  
    4949        $url = rtrim( network_home_url(), '/' );
    5050        if ( !empty( $blogname ) )
    51             $url = preg_replace( '|^([^\.]+://)|', '$1' . $blogname . '.', $url );
     51            $url = preg_replace( '|^([^\.]+://)|', "\${1}" . $blogname . '.', $url );
    5252    } else {
    5353        $url = network_home_url( $blogname );
Note: See TracChangeset for help on using the changeset viewer.