From 7e337700109b0baf4795a228735325d9bb98d322 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 13 Mar 2013 16:00:38 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@23686 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/ms-blogs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 19bea526a6..7761e9007a 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -48,7 +48,7 @@ function get_blogaddress_by_name( $blogname ) { $blogname = 'www'; $url = rtrim( network_home_url(), '/' ); if ( !empty( $blogname ) ) - $url = preg_replace( '|^([^\.]+://)|', '$1' . $blogname . '.', $url ); + $url = preg_replace( '|^([^\.]+://)|', "\${1}" . $blogname . '.', $url ); } else { $url = network_home_url( $blogname ); }